|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.netflix.astyanax.test.TestKeyspace
public class TestKeyspace
Constructor Summary | |
---|---|
TestKeyspace(java.lang.String name)
|
Method Summary | ||
---|---|---|
|
createColumnFamily(ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
Create a column family in this keyspace |
|
|
createColumnFamily(java.util.Map<java.lang.String,java.lang.Object> options)
Create a column family from the provied options |
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options)
Create the keyspace in cassandra. |
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options,
java.util.Map<ColumnFamily,java.util.Map<java.lang.String,java.lang.Object>> cfs)
Bulk create for a keyspace and a bunch of column famlies |
|
com.netflix.astyanax.ddl.KeyspaceDefinition |
describeKeyspace()
Return a complete description of the keyspace and its column families |
|
java.lang.String |
describePartitioner()
Describe the partitioner used by the cluster |
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing()
Get a list of all tokens and their endpoints. |
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing(boolean cached)
Describe the ring but use the last locally cached version if available. |
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing(java.lang.String dc)
Get a list of all tokens and their endpoints for a specific dc only. |
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing(java.lang.String dc,
java.lang.String rack)
Get a list of tokens and their endpoints for a specific dc/rack combination. |
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
describeSchemaVersions()
List all schema versions in the cluster. |
|
|
dropColumnFamily(ColumnFamily<K,C> columnFamily)
Drop a column family from this keyspace |
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
dropColumnFamily(java.lang.String columnFamilyName)
Drop a column family from this keyspace |
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
dropKeyspace()
Drop this keyspace from cassandra |
|
AstyanaxConfiguration |
getConfig()
Return the configuration object used to set up this keyspace |
|
com.netflix.astyanax.connectionpool.ConnectionPool<?> |
getConnectionPool()
Exposes the internal connection pool to the client. |
|
java.lang.String |
getKeyspaceName()
Returns keyspace name |
|
com.netflix.astyanax.partitioner.Partitioner |
getPartitioner()
Return the partitioner for this keyspace. |
|
SerializerPackage |
getSerializerPackage(java.lang.String columnFamily,
boolean ignoreErrors)
Return the serializer package for a specific column family. |
|
|
prepareColumnMutation(ColumnFamily<K,C> columnFamily,
K rowKey,
C column)
Mutation for a single column |
|
CqlStatement |
prepareCqlStatement()
Prepare a CQL Statement on the keyspace |
|
MutationBatch |
prepareMutationBatch()
Prepare a batch mutation object. |
|
|
prepareQuery(ColumnFamily<K,C> cf)
Starting point for constructing a query. |
|
void |
setTokenRange(java.util.List<com.netflix.astyanax.connectionpool.TokenRange> tokens)
|
|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation)
This method is used for testing purposes only. |
|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation,
com.netflix.astyanax.retry.RetryPolicy retry)
This method is used for testing purposes only. |
|
|
truncateColumnFamily(ColumnFamily<K,C> columnFamily)
Delete all rows in a column family |
|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
truncateColumnFamily(java.lang.String columnFamily)
Delete all rows in a column family |
|
|
updateColumnFamily(ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
Update the column family in cassandra |
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
updateKeyspace(java.util.Map<java.lang.String,java.lang.Object> options)
Update the keyspace in cassandra. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestKeyspace(java.lang.String name)
Method Detail |
---|
public void setTokenRange(java.util.List<com.netflix.astyanax.connectionpool.TokenRange> tokens)
public java.lang.String getKeyspaceName()
Keyspace
getKeyspaceName
in interface Keyspace
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing() throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeRing
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public MutationBatch prepareMutationBatch()
Keyspace
prepareMutationBatch
in interface Keyspace
public <K,C> ColumnFamilyQuery<K,C> prepareQuery(ColumnFamily<K,C> cf)
Keyspace
prepareQuery
in interface Keyspace
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 <K,C> ColumnMutation prepareColumnMutation(ColumnFamily<K,C> columnFamily, K rowKey, C column)
Keyspace
prepareColumnMutation
in interface Keyspace
public AstyanaxConfiguration getConfig()
Keyspace
getConfig
in interface Keyspace
public com.netflix.astyanax.ddl.KeyspaceDefinition describeKeyspace() throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeKeyspace
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public SerializerPackage getSerializerPackage(java.lang.String columnFamily, boolean ignoreErrors)
Keyspace
getSerializerPackage
in interface Keyspace
public com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
testOperation
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> truncateColumnFamily(ColumnFamily<K,C> columnFamily) throws com.netflix.astyanax.connectionpool.exceptions.OperationException, com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
truncateColumnFamily
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.OperationException
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation, com.netflix.astyanax.retry.RetryPolicy retry) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
testOperation
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing(boolean cached) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeRing
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing(java.lang.String dc) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeRing
in interface Keyspace
dc
- - null for all dcs
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing(java.lang.String dc, java.lang.String rack) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeRing
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> truncateColumnFamily(java.lang.String columnFamily) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
truncateColumnFamily
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
com.netflix.astyanax.connectionpool.exceptions.OperationException
public java.lang.String describePartitioner() throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describePartitioner
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> dropColumnFamily(java.lang.String columnFamilyName) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
dropColumnFamily
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> dropColumnFamily(ColumnFamily<K,C> columnFamily) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
dropColumnFamily
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> dropKeyspace() throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
dropKeyspace
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> createColumnFamily(ColumnFamily<K,C> columnFamily, java.util.Map<java.lang.String,java.lang.Object> options) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
createColumnFamily
in interface Keyspace
options
- - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> updateColumnFamily(ColumnFamily<K,C> columnFamily, java.util.Map<java.lang.String,java.lang.Object> options) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
updateColumnFamily
in interface Keyspace
options
- - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
createKeyspace
in interface Keyspace
options
- - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> updateKeyspace(java.util.Map<java.lang.String,java.lang.Object> options) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
updateKeyspace
in interface Keyspace
options
- - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> createColumnFamily(java.util.Map<java.lang.String,java.lang.Object> options) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
createColumnFamily
in interface Keyspace
options
- - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> describeSchemaVersions() throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeSchemaVersions
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.ConnectionPool<?> getConnectionPool() throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
getConnectionPool
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public CqlStatement prepareCqlStatement()
Keyspace
prepareCqlStatement
in interface Keyspace
public com.netflix.astyanax.partitioner.Partitioner getPartitioner() throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
getPartitioner
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options, java.util.Map<ColumnFamily,java.util.Map<java.lang.String,java.lang.Object>> cfs) throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
createKeyspace
in interface Keyspace
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |