com.netflix.astyanax.thrift
Class ThriftKeyspaceImpl
java.lang.Object
com.netflix.astyanax.thrift.ThriftKeyspaceImpl
- All Implemented Interfaces:
- com.netflix.astyanax.Keyspace
public final class ThriftKeyspaceImpl
- extends java.lang.Object
- implements com.netflix.astyanax.Keyspace
|
Constructor Summary |
ThriftKeyspaceImpl(java.lang.String ksName,
com.netflix.astyanax.connectionpool.ConnectionPool<org.apache.cassandra.thrift.Cassandra.Client> pool,
com.netflix.astyanax.AstyanaxConfiguration config,
com.netflix.astyanax.KeyspaceTracerFactory tracerFactory)
|
|
Method Summary |
<K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
|
createColumnFamily(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
createColumnFamily(java.util.Map<java.lang.String,java.lang.Object> options)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
createColumnFamily(java.util.Properties props)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options,
java.util.Map<com.netflix.astyanax.model.ColumnFamily,java.util.Map<java.lang.String,java.lang.Object>> cfs)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
createKeyspace(java.util.Properties props)
|
com.netflix.astyanax.ddl.KeyspaceDefinition |
describeKeyspace()
|
java.lang.String |
describePartitioner()
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing()
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing(boolean cached)
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing(java.lang.String dc)
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing(java.lang.String dc,
java.lang.String rack)
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
describeSchemaVersions()
|
<K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
|
dropColumnFamily(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
dropColumnFamily(java.lang.String columnFamilyName)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
dropKeyspace()
|
java.util.Properties |
getColumnFamilyProperties(java.lang.String columnFamily)
|
com.netflix.astyanax.AstyanaxConfiguration |
getConfig()
|
com.netflix.astyanax.connectionpool.ConnectionPool<org.apache.cassandra.thrift.Cassandra.Client> |
getConnectionPool()
|
java.lang.String |
getKeyspaceName()
|
java.util.Properties |
getKeyspaceProperties()
|
com.netflix.astyanax.partitioner.Partitioner |
getPartitioner()
|
com.netflix.astyanax.SerializerPackage |
getSerializerPackage(java.lang.String cfName,
boolean ignoreErrors)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
internalCreateKeyspace(org.apache.cassandra.thrift.KsDef ksDef)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
internalUpdateKeyspace(org.apache.cassandra.thrift.KsDef ksDef)
|
<K,C> com.netflix.astyanax.ColumnMutation |
|
prepareColumnMutation(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily,
K rowKey,
C column)
|
com.netflix.astyanax.cql.CqlStatement |
prepareCqlStatement()
|
com.netflix.astyanax.MutationBatch |
prepareMutationBatch()
|
<K,C> com.netflix.astyanax.query.ColumnFamilyQuery<K,C> |
|
prepareQuery(com.netflix.astyanax.model.ColumnFamily<K,C> cf)
|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation)
|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation,
com.netflix.astyanax.retry.RetryPolicy retry)
|
<K,C> com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
|
truncateColumnFamily(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily)
|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
truncateColumnFamily(java.lang.String columnFamily)
|
<K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
|
updateColumnFamily(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
updateColumnFamily(java.util.Map<java.lang.String,java.lang.Object> options)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
updateColumnFamily(java.util.Properties props)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
updateKeyspace(java.util.Map<java.lang.String,java.lang.Object> options)
|
com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> |
updateKeyspace(java.util.Properties props)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThriftKeyspaceImpl
public ThriftKeyspaceImpl(java.lang.String ksName,
com.netflix.astyanax.connectionpool.ConnectionPool<org.apache.cassandra.thrift.Cassandra.Client> pool,
com.netflix.astyanax.AstyanaxConfiguration config,
com.netflix.astyanax.KeyspaceTracerFactory tracerFactory)
getKeyspaceName
public java.lang.String getKeyspaceName()
- Specified by:
getKeyspaceName in interface com.netflix.astyanax.Keyspace
prepareMutationBatch
public com.netflix.astyanax.MutationBatch prepareMutationBatch()
- Specified by:
prepareMutationBatch in interface com.netflix.astyanax.Keyspace
describeRing
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
describeRing in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
describeRing
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing(java.lang.String dc)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
describeRing in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
describeRing
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
- Specified by:
describeRing in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
describeRing
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing(boolean cached)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
describeRing in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
describeKeyspace
public com.netflix.astyanax.ddl.KeyspaceDefinition describeKeyspace()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
describeKeyspace in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
describeSchemaVersions
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> describeSchemaVersions()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
describeSchemaVersions in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
prepareQuery
public <K,C> com.netflix.astyanax.query.ColumnFamilyQuery<K,C> prepareQuery(com.netflix.astyanax.model.ColumnFamily<K,C> cf)
- Specified by:
prepareQuery in interface com.netflix.astyanax.Keyspace
prepareColumnMutation
public <K,C> com.netflix.astyanax.ColumnMutation prepareColumnMutation(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily,
K rowKey,
C column)
- Specified by:
prepareColumnMutation in interface com.netflix.astyanax.Keyspace
getConfig
public com.netflix.astyanax.AstyanaxConfiguration getConfig()
- Specified by:
getConfig in interface com.netflix.astyanax.Keyspace
getSerializerPackage
public com.netflix.astyanax.SerializerPackage getSerializerPackage(java.lang.String cfName,
boolean ignoreErrors)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException,
com.netflix.astyanax.serializers.UnknownComparatorException
- Specified by:
getSerializerPackage in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
com.netflix.astyanax.serializers.UnknownComparatorException
testOperation
public com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
testOperation in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
testOperation
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
- Specified by:
testOperation in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
getConnectionPool
public com.netflix.astyanax.connectionpool.ConnectionPool<org.apache.cassandra.thrift.Cassandra.Client> getConnectionPool()
- Specified by:
getConnectionPool in interface com.netflix.astyanax.Keyspace
truncateColumnFamily
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> truncateColumnFamily(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily)
throws com.netflix.astyanax.connectionpool.exceptions.OperationException,
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
truncateColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.OperationException
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
truncateColumnFamily
public com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> truncateColumnFamily(java.lang.String columnFamily)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
truncateColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
describePartitioner
public java.lang.String describePartitioner()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
describePartitioner in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
createColumnFamily
public 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
- Specified by:
createColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
createKeyspace
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<com.netflix.astyanax.model.ColumnFamily,java.util.Map<java.lang.String,java.lang.Object>> cfs)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
createKeyspace in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
createKeyspace
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> createKeyspace(java.util.Properties props)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
createKeyspace in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
createColumnFamily
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> createColumnFamily(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
createColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
updateColumnFamily
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> updateColumnFamily(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
updateColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
dropColumnFamily
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> dropColumnFamily(java.lang.String columnFamilyName)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
dropColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
dropColumnFamily
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> dropColumnFamily(com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
dropColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
createKeyspace
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
- Specified by:
createKeyspace in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
updateKeyspace
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
- Specified by:
updateKeyspace in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
dropKeyspace
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> dropKeyspace()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
dropKeyspace in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
prepareCqlStatement
public com.netflix.astyanax.cql.CqlStatement prepareCqlStatement()
- Specified by:
prepareCqlStatement in interface com.netflix.astyanax.Keyspace
getPartitioner
public com.netflix.astyanax.partitioner.Partitioner getPartitioner()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
getPartitioner in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
updateKeyspace
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> updateKeyspace(java.util.Properties props)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
updateKeyspace in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
internalUpdateKeyspace
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> internalUpdateKeyspace(org.apache.cassandra.thrift.KsDef ksDef)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
internalCreateKeyspace
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> internalCreateKeyspace(org.apache.cassandra.thrift.KsDef ksDef)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
createColumnFamily
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> createColumnFamily(java.util.Properties props)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
createColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
updateColumnFamily
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> updateColumnFamily(java.util.Map<java.lang.String,java.lang.Object> options)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
updateColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
updateColumnFamily
public com.netflix.astyanax.connectionpool.OperationResult<com.netflix.astyanax.ddl.SchemaChangeResult> updateColumnFamily(java.util.Properties props)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
updateColumnFamily in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
getKeyspaceProperties
public java.util.Properties getKeyspaceProperties()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
getKeyspaceProperties in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
getColumnFamilyProperties
public java.util.Properties getColumnFamilyProperties(java.lang.String columnFamily)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
- Specified by:
getColumnFamilyProperties in interface com.netflix.astyanax.Keyspace
- Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException