public class

ThriftClusterImpl

extends Object
implements Cluster
java.lang.Object
   ↳ com.netflix.astyanax.thrift.ThriftClusterImpl

Summary

Public Constructors
ThriftClusterImpl(AstyanaxConfiguration config, ConnectionPool<Client> connectionPool, KeyspaceTracerFactory tracerFactory)
Public Methods
String addColumnFamily(ColumnFamilyDefinition def)
Add a column family to an existing keyspace@return
String addKeyspace(KeyspaceDefinition def)
Add a new keyspace to the cluster.
String describeClusterName()
The cluster name is completely arbitrary@return
KeyspaceDefinition describeKeyspace(String ksName)
Describe a single keyspace@return
List<KeyspaceDefinition> describeKeyspaces()
Return details about all keyspaces in the cluster@return
String describePartitioner()
Describe the partitioner used by the cluster@return
Map<StringList<String>> describeSchemaVersions()
String describeSnitch()
Describe the snitch name used on the cluster@return
String dropColumnFamily(String keyspaceName, String columnFamilyName)
Delete the column family from the keyspace@return
String dropKeyspace(String keyspaceName)
Delete a keyspace from the cluster@return
AstyanaxConfiguration getConfig()
Configuration object for this Cluster
Keyspace getKeyspace(String ksName)
Return a keyspace client.
String getVersion()
Get the version from the cluster@return
ColumnDefinition makeColumnDefinition()
Make a column definitio to be added to a ColumnFamilyDefinition
ColumnFamilyDefinition makeColumnFamilyDefinition()
Prepare a column family definition.
KeyspaceDefinition makeKeyspaceDefinition()
Prepare a keyspace definition.
String updateColumnFamily(ColumnFamilyDefinition def)
Update an existing column family@return
String updateKeyspace(KeyspaceDefinition def)
Update a new keyspace in the cluster.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.netflix.astyanax.Cluster

Public Constructors

public ThriftClusterImpl (AstyanaxConfiguration config, ConnectionPool<Client> connectionPool, KeyspaceTracerFactory tracerFactory)

Public Methods

public String addColumnFamily (ColumnFamilyDefinition def)

Add a column family to an existing keyspace@return

Parameters
def - Created by calling prepareColumnFamilyDefinition();

public String addKeyspace (KeyspaceDefinition def)

Add a new keyspace to the cluster. The keyspace object may include column families as well. Create a KeyspaceDefinition object by calling prepareKeyspaceDefinition().

public String describeClusterName ()

The cluster name is completely arbitrary@return

public KeyspaceDefinition describeKeyspace (String ksName)

Describe a single keyspace@return

public List<KeyspaceDefinition> describeKeyspaces ()

Return details about all keyspaces in the cluster@return

public String describePartitioner ()

Describe the partitioner used by the cluster@return

public Map<StringList<String>> describeSchemaVersions ()

public String describeSnitch ()

Describe the snitch name used on the cluster@return

public String dropColumnFamily (String keyspaceName, String columnFamilyName)

Delete the column family from the keyspace@return

public String dropKeyspace (String keyspaceName)

Delete a keyspace from the cluster@return

public AstyanaxConfiguration getConfig ()

Configuration object for this Cluster

public Keyspace getKeyspace (String ksName)

Return a keyspace client. Note that this keyspace will use the same connection pool as the cluster and any other keyspaces created from this cluster instance. As a result each keyspace operation is likely to have some overhead for switching keyspaces.

public String getVersion ()

Get the version from the cluster@return

public ColumnDefinition makeColumnDefinition ()

Make a column definitio to be added to a ColumnFamilyDefinition

public ColumnFamilyDefinition makeColumnFamilyDefinition ()

Prepare a column family definition. Call execute() on the returned object to create the column family.

public KeyspaceDefinition makeKeyspaceDefinition ()

Prepare a keyspace definition. Call execute() on the returned object to create the keyspace. Not that column families can be added the keyspace definition here instead of calling prepareColumnFamilyDefinition separately.

public String updateColumnFamily (ColumnFamilyDefinition def)

Update an existing column family@return

Parameters
def - Created by calling prepareColumnFamilyDefinition();

public String updateKeyspace (KeyspaceDefinition def)

Update a new keyspace in the cluster. The keyspace object may include column families as well. Create a KeyspaceDefinition object by calling prepareKeyspaceDefinition().