com.netflix.astyanax.impl
Class AstyanaxConfigurationImpl

java.lang.Object
  extended by com.netflix.astyanax.impl.AstyanaxConfigurationImpl
All Implemented Interfaces:
AstyanaxConfiguration

public class AstyanaxConfigurationImpl
extends java.lang.Object
implements AstyanaxConfiguration


Constructor Summary
AstyanaxConfigurationImpl()
           
 
Method Summary
 java.util.concurrent.ExecutorService getAsyncExecutor()
          Return the maximum number of allows async threads to executeAsync()
 com.netflix.astyanax.Clock getClock()
          Return clock to use when setting timestamps for column insertion and deletion operations.
 com.netflix.astyanax.connectionpool.impl.ConnectionPoolType getConnectionPoolType()
          Type of connection pool to use for this instance
 java.lang.String getCqlVersion()
          Get the CQL version to set when sending CQL queries
 ConsistencyLevel getDefaultReadConsistencyLevel()
          Default consistency level used when reading from the cluster.
 ConsistencyLevel getDefaultWriteConsistencyLevel()
          Default consistency level used when reading from the cluster.
 int getDiscoveryDelayInSeconds()
          Fixed delay for node disocvery refresh
 com.netflix.astyanax.connectionpool.NodeDiscoveryType getDiscoveryType()
          Get type of node discovery to perform
 com.netflix.astyanax.partitioner.Partitioner getPartitioner(java.lang.String partitionerName)
           
 com.netflix.astyanax.retry.RetryPolicy getRetryPolicy()
          TODO
 java.lang.String getTargetCassandraVersion()
           
 AstyanaxConfigurationImpl registerPartitioner(java.lang.String name, com.netflix.astyanax.partitioner.Partitioner partitioner)
           
 AstyanaxConfigurationImpl setAsyncExecutor(java.util.concurrent.ExecutorService executor)
           
 AstyanaxConfigurationImpl setClock(com.netflix.astyanax.Clock clock)
           
 AstyanaxConfigurationImpl setConnectionPoolType(com.netflix.astyanax.connectionpool.impl.ConnectionPoolType connectionPoolType)
           
 AstyanaxConfigurationImpl setCqlVersion(java.lang.String cqlVersion)
           
 AstyanaxConfigurationImpl setDefaultReadConsistencyLevel(ConsistencyLevel cl)
           
 AstyanaxConfigurationImpl setDefaultWriteConsistencyLevel(ConsistencyLevel cl)
           
 AstyanaxConfigurationImpl setDiscoveryDelayInSeconds(int delay)
           
 AstyanaxConfigurationImpl setDiscoveryType(com.netflix.astyanax.connectionpool.NodeDiscoveryType discoveryType)
           
 AstyanaxConfigurationImpl setPartitioners(java.util.Map<java.lang.String,com.netflix.astyanax.partitioner.Partitioner> partitioners)
           
 AstyanaxConfigurationImpl setRetryPolicy(com.netflix.astyanax.retry.RetryPolicy retryPolicy)
           
 AstyanaxConfigurationImpl setTargetCassandraVersion(java.lang.String version)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AstyanaxConfigurationImpl

public AstyanaxConfigurationImpl()
Method Detail

setConnectionPoolType

public AstyanaxConfigurationImpl setConnectionPoolType(com.netflix.astyanax.connectionpool.impl.ConnectionPoolType connectionPoolType)

getConnectionPoolType

public com.netflix.astyanax.connectionpool.impl.ConnectionPoolType getConnectionPoolType()
Description copied from interface: AstyanaxConfiguration
Type of connection pool to use for this instance

Specified by:
getConnectionPoolType in interface AstyanaxConfiguration

getDefaultReadConsistencyLevel

public ConsistencyLevel getDefaultReadConsistencyLevel()
Description copied from interface: AstyanaxConfiguration
Default consistency level used when reading from the cluster. This value can be overwritten on the Query operations (returned by Keyspace.prepareXXQuery) by calling Query.setConsistencyLevel().

Specified by:
getDefaultReadConsistencyLevel in interface AstyanaxConfiguration

setDefaultReadConsistencyLevel

public AstyanaxConfigurationImpl setDefaultReadConsistencyLevel(ConsistencyLevel cl)

getDefaultWriteConsistencyLevel

public ConsistencyLevel getDefaultWriteConsistencyLevel()
Description copied from interface: AstyanaxConfiguration
Default consistency level used when reading from the cluster. This value can be overwritten on MutationBatch operation (returned by Keyspace.prepareMutationBatch) by calling MutationBatch.setConsistencyLevel().

Specified by:
getDefaultWriteConsistencyLevel in interface AstyanaxConfiguration

setDefaultWriteConsistencyLevel

public AstyanaxConfigurationImpl setDefaultWriteConsistencyLevel(ConsistencyLevel cl)

getClock

public com.netflix.astyanax.Clock getClock()
Description copied from interface: AstyanaxConfiguration
Return clock to use when setting timestamps for column insertion and deletion operations.

Specified by:
getClock in interface AstyanaxConfiguration

setClock

public AstyanaxConfigurationImpl setClock(com.netflix.astyanax.Clock clock)

getAsyncExecutor

public java.util.concurrent.ExecutorService getAsyncExecutor()
Description copied from interface: AstyanaxConfiguration
Return the maximum number of allows async threads to executeAsync()

Specified by:
getAsyncExecutor in interface AstyanaxConfiguration

setAsyncExecutor

public AstyanaxConfigurationImpl setAsyncExecutor(java.util.concurrent.ExecutorService executor)

getRetryPolicy

public com.netflix.astyanax.retry.RetryPolicy getRetryPolicy()
Description copied from interface: AstyanaxConfiguration
TODO

Specified by:
getRetryPolicy in interface AstyanaxConfiguration

setRetryPolicy

public AstyanaxConfigurationImpl setRetryPolicy(com.netflix.astyanax.retry.RetryPolicy retryPolicy)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDiscoveryDelayInSeconds

public int getDiscoveryDelayInSeconds()
Description copied from interface: AstyanaxConfiguration
Fixed delay for node disocvery refresh

Specified by:
getDiscoveryDelayInSeconds in interface AstyanaxConfiguration

setDiscoveryDelayInSeconds

public AstyanaxConfigurationImpl setDiscoveryDelayInSeconds(int delay)

getDiscoveryType

public com.netflix.astyanax.connectionpool.NodeDiscoveryType getDiscoveryType()
Description copied from interface: AstyanaxConfiguration
Get type of node discovery to perform

Specified by:
getDiscoveryType in interface AstyanaxConfiguration

setDiscoveryType

public AstyanaxConfigurationImpl setDiscoveryType(com.netflix.astyanax.connectionpool.NodeDiscoveryType discoveryType)

getCqlVersion

public java.lang.String getCqlVersion()
Description copied from interface: AstyanaxConfiguration
Get the CQL version to set when sending CQL queries

Specified by:
getCqlVersion in interface AstyanaxConfiguration

setCqlVersion

public AstyanaxConfigurationImpl setCqlVersion(java.lang.String cqlVersion)

getTargetCassandraVersion

public java.lang.String getTargetCassandraVersion()
Specified by:
getTargetCassandraVersion in interface AstyanaxConfiguration
Returns:
Returns the major cassandra version (x.x) with which this client is communicating. This is a hack for backwards compatibility when APIs break between version

setTargetCassandraVersion

public AstyanaxConfigurationImpl setTargetCassandraVersion(java.lang.String version)

registerPartitioner

public AstyanaxConfigurationImpl registerPartitioner(java.lang.String name,
                                                     com.netflix.astyanax.partitioner.Partitioner partitioner)

setPartitioners

public AstyanaxConfigurationImpl setPartitioners(java.util.Map<java.lang.String,com.netflix.astyanax.partitioner.Partitioner> partitioners)

getPartitioner

public com.netflix.astyanax.partitioner.Partitioner getPartitioner(java.lang.String partitionerName)
                                                            throws java.lang.Exception
Specified by:
getPartitioner in interface AstyanaxConfiguration
Returns:
Return the partitioner implementation for the specified partitioner name
Throws:
java.lang.Exception