public final class

ThriftKeyspaceImpl

extends Object
implements Keyspace
java.lang.Object
   ↳ com.netflix.astyanax.thrift.ThriftKeyspaceImpl

Summary

Public Constructors
ThriftKeyspaceImpl(String ksName, ConnectionPool<Client> pool, AstyanaxConfiguration config, KeyspaceTracerFactory tracerFactory)
Public Methods
KeyspaceDefinition describeKeyspace()
Return a complete description of the keyspace and its column families@return
List<TokenRange> describeRing()
Get a list of all tokens and their endpoints@return
List<TokenRange> describeRing(boolean cached)
Describe the ring but use the last locally cached version if available.@return
AstyanaxConfiguration getConfig()
Return the configuration object used to set up this keyspace
String getKeyspaceName()
Returns keyspace name
SerializerPackage getSerializerPackage(String cfName, boolean ignoreErrors)
Return the serializer package for a specific column family.
<K, C> ColumnMutation prepareColumnMutation(ColumnFamily<K, C> columnFamily, K rowKey, C column)
Mutation for a single column
MutationBatch prepareMutationBatch()
Prepare a batch mutation object.
<K, C> ColumnFamilyQuery<K, C> prepareQuery(ColumnFamily<K, C> cf)
Starting point for constructing a query.
OperationResult<Void> testOperation(Operation<?, ?> operation)
This method is used for testing purposes only.
OperationResult<Void> testOperation(Operation<?, ?> operation, RetryPolicy retry)
This method is used for testing purposes only.
<K, C> OperationResult<Void> truncateColumnFamily(ColumnFamily<K, C> columnFamily)
Delete all rows in a column family@return
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.netflix.astyanax.Keyspace

Public Constructors

public ThriftKeyspaceImpl (String ksName, ConnectionPool<Client> pool, AstyanaxConfiguration config, KeyspaceTracerFactory tracerFactory)

Public Methods

public KeyspaceDefinition describeKeyspace ()

Return a complete description of the keyspace and its column families@return

public List<TokenRange> describeRing ()

Get a list of all tokens and their endpoints@return

public List<TokenRange> describeRing (boolean cached)

Describe the ring but use the last locally cached version if available.@return

public AstyanaxConfiguration getConfig ()

Return the configuration object used to set up this keyspace

public String getKeyspaceName ()

Returns keyspace name

public SerializerPackage getSerializerPackage (String cfName, boolean ignoreErrors)

Return the serializer package for a specific column family. This requires a call to the Cassandra cluster and is therefore cached to reduce load on Cassandra and since this data rarely changes.@return

public ColumnMutation prepareColumnMutation (ColumnFamily<K, C> columnFamily, K rowKey, C column)

Mutation for a single column

public MutationBatch prepareMutationBatch ()

Prepare a batch mutation object. It is possible to create multiple batch mutations and later merge them into a single mutation by calling mergeShallow on a batch mutation object.@return

public ColumnFamilyQuery<K, C> prepareQuery (ColumnFamily<K, C> cf)

Starting point for constructing a query. From the column family the client can perform all 4 types of queries: get column, get key slice, get key range and and index query.

Parameters
cf Column family to be used for the query. The key and column serializers in the ColumnFamily are automatically used while constructing the query and the response.

public OperationResult<Void> testOperation (Operation<?, ?> operation)

This method is used for testing purposes only. It is used to inject errors in the connection pool.@return

public OperationResult<Void> testOperation (Operation<?, ?> operation, RetryPolicy retry)

This method is used for testing purposes only. It is used to inject errors in the connection pool.@return

public OperationResult<Void> truncateColumnFamily (ColumnFamily<K, C> columnFamily)

Delete all rows in a column family@return