me.prettyprint.cassandra.service
Class ThriftCluster

java.lang.Object
  extended by me.prettyprint.cassandra.service.AbstractCluster
      extended by me.prettyprint.cassandra.service.ThriftCluster
All Implemented Interfaces:
Cluster

public class ThriftCluster
extends AbstractCluster
implements Cluster


Field Summary
 
Fields inherited from class me.prettyprint.cassandra.service.AbstractCluster
connectionManager, xtrans
 
Constructor Summary
ThriftCluster(String clusterName, CassandraHostConfigurator cassandraHostConfigurator)
           
ThriftCluster(String clusterName, CassandraHostConfigurator cassandraHostConfigurator, Map<String,String> credentials)
           
 
Method Summary
 String addColumnFamily(ColumnFamilyDefinition cfdef)
          Add a column family and returns without waiting for schema cluster agreement.
 String addColumnFamily(ColumnFamilyDefinition cfdef, boolean blockUntilComplete)
          Add a column family and wait for schema cluster agreement if blockUntilComplete is set to true.
 String addKeyspace(KeyspaceDefinition ksdef)
          Add a keyspace and does not wait for schema agreement.
 String addKeyspace(KeyspaceDefinition ksdef, boolean blockUntilComplete)
          Add a keyspace and wait for schema cluster agreement if blockUntilComplete is set to true.
 List<org.apache.cassandra.thrift.TokenRange> describeRing(String keyspace)
           
 Map<String,List<String>> describeSchemaVersions()
           
 String updateColumnFamily(ColumnFamilyDefinition cfdef)
          Updates a column family and does not wait for schema agreement.
 String updateColumnFamily(ColumnFamilyDefinition cfdef, boolean blockUntilComplete)
          Update a column family and wait for schema cluster agreement if blockUntilComplete is set to true.
 String updateKeyspace(KeyspaceDefinition ksdef)
          Updates the Keyspace from the cluster without waiting for schema agreement.
 String updateKeyspace(KeyspaceDefinition ksdef, boolean blockUntilComplete)
          Updates the Keyspace and wait for schema cluster agreement if blockUntilComplete is set to true.
 
Methods inherited from class me.prettyprint.cassandra.service.AbstractCluster
addHost, describeClusterName, describeKeyspace, describeKeyspaces, describePartitioner, describeThriftVersion, dropColumnFamily, dropColumnFamily, dropKeyspace, dropKeyspace, getClusterName, getConnectionManager, getCredentials, getKnownPoolHosts, getName, truncate, waitForSchemaAgreement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface me.prettyprint.hector.api.Cluster
addHost, describeClusterName, describeKeyspace, describeKeyspaces, describePartitioner, describeThriftVersion, dropColumnFamily, dropColumnFamily, dropKeyspace, dropKeyspace, getClusterName, getConnectionManager, getCredentials, getKnownPoolHosts, getName, truncate
 

Constructor Detail

ThriftCluster

public ThriftCluster(String clusterName,
                     CassandraHostConfigurator cassandraHostConfigurator)

ThriftCluster

public ThriftCluster(String clusterName,
                     CassandraHostConfigurator cassandraHostConfigurator,
                     Map<String,String> credentials)
Method Detail

describeRing

public List<org.apache.cassandra.thrift.TokenRange> describeRing(String keyspace)
                                                          throws HectorException
Specified by:
describeRing in interface Cluster
Throws:
HectorException

describeSchemaVersions

public Map<String,List<String>> describeSchemaVersions()
                                                throws HectorException
Specified by:
describeSchemaVersions in interface Cluster
Throws:
HectorException

updateKeyspace

public String updateKeyspace(KeyspaceDefinition ksdef)
                      throws HectorException
Description copied from interface: Cluster
Updates the Keyspace from the cluster without waiting for schema agreement.

Specified by:
updateKeyspace in interface Cluster
Throws:
HectorException

updateKeyspace

public String updateKeyspace(KeyspaceDefinition ksdef,
                             boolean blockUntilComplete)
                      throws HectorException
Description copied from interface: Cluster
Updates the Keyspace and wait for schema cluster agreement if blockUntilComplete is set to true. Otherwise it behaves exactly like: Cluster.updateKeyspace(KeyspaceDefinition)

Specified by:
updateKeyspace in interface Cluster
Throws:
HectorException

addColumnFamily

public String addColumnFamily(ColumnFamilyDefinition cfdef)
                       throws HectorException
Description copied from interface: Cluster
Add a column family and returns without waiting for schema cluster agreement.

Specified by:
addColumnFamily in interface Cluster
Throws:
HectorException

addColumnFamily

public String addColumnFamily(ColumnFamilyDefinition cfdef,
                              boolean blockUntilComplete)
                       throws HectorException
Description copied from interface: Cluster
Add a column family and wait for schema cluster agreement if blockUntilComplete is set to true. Otherwise it behaves exactly like: Cluster.addColumnFamily(ColumnFamilyDefinition)

Specified by:
addColumnFamily in interface Cluster
Throws:
HectorException

updateColumnFamily

public String updateColumnFamily(ColumnFamilyDefinition cfdef)
                          throws HectorException
Description copied from interface: Cluster
Updates a column family and does not wait for schema agreement.

Specified by:
updateColumnFamily in interface Cluster
Throws:
HectorException

updateColumnFamily

public String updateColumnFamily(ColumnFamilyDefinition cfdef,
                                 boolean blockUntilComplete)
                          throws HectorException
Description copied from interface: Cluster
Update a column family and wait for schema cluster agreement if blockUntilComplete is set to true. Otherwise it behaves exactly like: #updateColumnFamily(String)

Specified by:
updateColumnFamily in interface Cluster
Throws:
HectorException

addKeyspace

public String addKeyspace(KeyspaceDefinition ksdef)
                   throws HectorException
Description copied from interface: Cluster
Add a keyspace and does not wait for schema agreement.

Specified by:
addKeyspace in interface Cluster
Throws:
HectorException

addKeyspace

public String addKeyspace(KeyspaceDefinition ksdef,
                          boolean blockUntilComplete)
                   throws HectorException
Description copied from interface: Cluster
Add a keyspace and wait for schema cluster agreement if blockUntilComplete is set to true. Otherwise it behaves exactly like: #addKeyspace(String)

Specified by:
addKeyspace in interface Cluster
Throws:
HectorException


Copyright © 2011. All Rights Reserved.