me.prettyprint.hector.api
Interface Cluster

All Known Implementing Classes:
AbstractCluster, ThriftCluster

public interface Cluster


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.
 void addHost(CassandraHost cassandraHost, boolean skipApplyConfig)
          Adds the host to this Cluster.
 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.
 String describeClusterName()
           
 KeyspaceDefinition describeKeyspace(String keyspace)
           
 List<KeyspaceDefinition> describeKeyspaces()
           
 String describePartitioner()
           
 List<org.apache.cassandra.thrift.TokenRange> describeRing(String keyspace)
           
 Map<String,List<String>> describeSchemaVersions()
           
 String describeThriftVersion()
           
 String dropColumnFamily(String keyspaceName, String columnFamily)
          Drops a column family and does not wait for schema agreement.
 String dropColumnFamily(String keyspaceName, String columnFamily, boolean blockUntilComplete)
          Drops a column family and wait for schema cluster agreement if blockUntilComplete is set to true.
 String dropKeyspace(String keyspace)
          Drops the Keyspace from the cluster.
 String dropKeyspace(String keyspace, boolean blockUntilComplete)
          Drops a Keyspace and wait for schema cluster agreement if blockUntilComplete is set to true.
 String getClusterName()
          Deprecated. use describeClusterName()
 HConnectionManager getConnectionManager()
           
 Map<String,String> getCredentials()
           
 Set<CassandraHost> getKnownPoolHosts(boolean refresh)
           
 String getName()
          Descriptive name of the cluster.
 void truncate(String keyspaceName, String columnFamily)
           
 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.
 

Method Detail

getKnownPoolHosts

Set<CassandraHost> getKnownPoolHosts(boolean refresh)

getConnectionManager

HConnectionManager getConnectionManager()

addHost

void addHost(CassandraHost cassandraHost,
             boolean skipApplyConfig)
Adds the host to this Cluster. Unless skipApplyConfig is set to true, the settings in the CassandraHostConfigurator will be applied to the provided CassandraHost

Parameters:
cassandraHost -
skipApplyConfig -

getName

String getName()
Descriptive name of the cluster. This name is used to identify the cluster.

Returns:

getClusterName

String getClusterName()
                      throws HectorException
Deprecated. use describeClusterName()

Throws:
HectorException

describeClusterName

String describeClusterName()
                           throws HectorException
Throws:
HectorException

describeThriftVersion

String describeThriftVersion()
                             throws HectorException
Throws:
HectorException

describeSchemaVersions

Map<String,List<String>> describeSchemaVersions()
                                                throws HectorException
Throws:
HectorException

describeKeyspace

KeyspaceDefinition describeKeyspace(String keyspace)
                                    throws HectorException
Throws:
HectorException

describeKeyspaces

List<KeyspaceDefinition> describeKeyspaces()
                                           throws HectorException
Throws:
HectorException

describeRing

List<org.apache.cassandra.thrift.TokenRange> describeRing(String keyspace)
                                                          throws HectorException
Throws:
HectorException

dropKeyspace

String dropKeyspace(String keyspace)
                    throws HectorException
Drops the Keyspace from the cluster. Equivalent of 'drop database' in SQL terms. Does not wait for schema agreement.

Throws:
HectorException

dropKeyspace

String dropKeyspace(String keyspace,
                    boolean blockUntilComplete)
                    throws HectorException
Drops a Keyspace and wait for schema cluster agreement if blockUntilComplete is set to true. Otherwise it behaves exactly like: dropKeyspace(String)

Throws:
HectorException

updateKeyspace

String updateKeyspace(KeyspaceDefinition ksdef)
                      throws HectorException
Updates the Keyspace from the cluster without waiting for schema agreement.

Throws:
HectorException

updateKeyspace

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

Throws:
HectorException

describePartitioner

String describePartitioner()
                           throws HectorException
Throws:
HectorException

addColumnFamily

String addColumnFamily(ColumnFamilyDefinition cfdef)
                       throws HectorException
Add a column family and returns without waiting for schema cluster agreement.

Throws:
HectorException

addColumnFamily

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

Throws:
HectorException

dropColumnFamily

String dropColumnFamily(String keyspaceName,
                        String columnFamily)
                        throws HectorException
Drops a column family and does not wait for schema agreement.

Throws:
HectorException

dropColumnFamily

String dropColumnFamily(String keyspaceName,
                        String columnFamily,
                        boolean blockUntilComplete)
                        throws HectorException
Drops a column family and wait for schema cluster agreement if blockUntilComplete is set to true. Otherwise it behaves exactly like: dropColumnFamily(String, String)

Throws:
HectorException

updateColumnFamily

String updateColumnFamily(ColumnFamilyDefinition cfdef)
                          throws HectorException
Updates a column family and does not wait for schema agreement.

Throws:
HectorException

updateColumnFamily

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

Throws:
HectorException

addKeyspace

String addKeyspace(KeyspaceDefinition ksdef)
                   throws HectorException
Add a keyspace and does not wait for schema agreement.

Throws:
HectorException

addKeyspace

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

Throws:
HectorException

truncate

void truncate(String keyspaceName,
              String columnFamily)
              throws HectorException
Throws:
HectorException

getCredentials

Map<String,String> getCredentials()


Copyright © 2011. All Rights Reserved.