public class ThriftCluster extends AbstractCluster implements Cluster
connectionManager, RING_DELAY, WAIT_FOR_SCHEMA_AGREEMENT_SLEEP_TIME, xtrans| Constructor and Description |
|---|
ThriftCluster(String clusterName,
CassandraHostConfigurator cassandraHostConfigurator) |
ThriftCluster(String clusterName,
CassandraHostConfigurator cassandraHostConfigurator,
Map<String,String> credentials) |
| Modifier and Type | Method and Description |
|---|---|
String |
addColumnFamily(ColumnFamilyDefinition cfdef)
Add a column family and returns without waiting for schema cluster agreement.
|
String |
addColumnFamily(ColumnFamilyDefinition cfdef,
boolean waitForSchemaAgreement)
Add a column family and wait for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
String |
addKeyspace(KeyspaceDefinition ksdef)
Add a keyspace and does not wait for schema agreement.
|
String |
addKeyspace(KeyspaceDefinition ksdef,
boolean waitForSchemaAgreement)
Add a keyspace and wait for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
List<org.apache.cassandra.thrift.TokenRange> |
describeRing(String keyspace) |
Map<String,List<String>> |
describeSchemaVersions() |
void |
onStartup()
called after the cluster has been initialized.
|
String |
updateColumnFamily(ColumnFamilyDefinition cfdef)
Updates a column family and does not wait for schema agreement.
|
String |
updateColumnFamily(ColumnFamilyDefinition cfdef,
boolean waitForSchemaAgreement)
Update a column family and wait for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
String |
updateKeyspace(KeyspaceDefinition ksdef)
Updates the Keyspace from the cluster without waiting for schema agreement.
|
String |
updateKeyspace(KeyspaceDefinition ksdef,
boolean waitForSchemaAgreement)
Updates the Keyspace and waitz for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
addHost, describeClusterName, describeKeyspace, describeKeyspaces, describePartitioner, describeThriftVersion, dropColumnFamily, dropColumnFamily, dropKeyspace, dropKeyspace, getClusterName, getConfigurator, getConnectionManager, getCredentials, getKnownPoolHosts, getName, truncate, waitForSchemaAgreementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddHost, describeClusterName, describeKeyspace, describeKeyspaces, describePartitioner, describeThriftVersion, dropColumnFamily, dropColumnFamily, dropKeyspace, dropKeyspace, getClusterName, getConnectionManager, getCredentials, getKnownPoolHosts, getName, truncatepublic ThriftCluster(String clusterName, CassandraHostConfigurator cassandraHostConfigurator)
public ThriftCluster(String clusterName, CassandraHostConfigurator cassandraHostConfigurator, Map<String,String> credentials)
public List<org.apache.cassandra.thrift.TokenRange> describeRing(String keyspace) throws HectorException
describeRing in interface ClusterHectorExceptionpublic Map<String,List<String>> describeSchemaVersions() throws HectorException
describeSchemaVersions in interface ClusterHectorExceptionpublic String updateKeyspace(KeyspaceDefinition ksdef) throws HectorException
ClusterupdateKeyspace in interface ClusterHectorExceptionpublic String updateKeyspace(KeyspaceDefinition ksdef, boolean waitForSchemaAgreement) throws HectorException
ClusterwaitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: Cluster.updateKeyspace(KeyspaceDefinition)updateKeyspace in interface ClusterHectorExceptionpublic String addColumnFamily(ColumnFamilyDefinition cfdef) throws HectorException
ClusteraddColumnFamily in interface ClusterHectorExceptionpublic String addColumnFamily(ColumnFamilyDefinition cfdef, boolean waitForSchemaAgreement) throws HectorException
ClusterwaitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: Cluster.addColumnFamily(ColumnFamilyDefinition)addColumnFamily in interface ClusterHectorExceptionpublic String updateColumnFamily(ColumnFamilyDefinition cfdef) throws HectorException
ClusterupdateColumnFamily in interface ClusterHectorExceptionpublic String updateColumnFamily(ColumnFamilyDefinition cfdef, boolean waitForSchemaAgreement) throws HectorException
ClusterwaitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: Cluster.updateColumnFamily(me.prettyprint.hector.api.ddl.ColumnFamilyDefinition)updateColumnFamily in interface ClusterHectorExceptionpublic String addKeyspace(KeyspaceDefinition ksdef) throws HectorException
ClusteraddKeyspace in interface ClusterHectorExceptionpublic String addKeyspace(KeyspaceDefinition ksdef, boolean waitForSchemaAgreement) throws HectorException
ClusterwaitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: Cluster.addKeyspace(me.prettyprint.hector.api.ddl.KeyspaceDefinition)addKeyspace in interface ClusterHectorExceptionpublic void onStartup()
ClusteronStartup in interface ClusteronStartup in class AbstractClusterCopyright © 2014. All Rights Reserved.