org.scale7.cassandra.pelops.pool
Class ThriftPoolBase

java.lang.Object
  extended by org.scale7.cassandra.pelops.pool.ThriftPoolBase
All Implemented Interfaces:
IThriftPool
Direct Known Subclasses:
CachePerNodePool, CommonsBackedPool, DebuggingPool

public abstract class ThriftPoolBase
extends Object
implements IThriftPool

Abstract impl of IThriftPool.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.scale7.cassandra.pelops.pool.IThriftPool
IThriftPool.IPooledConnection
 
Constructor Summary
ThriftPoolBase()
           
 
Method Summary
 Mutator createMutator()
          Create a mutator object using the current time as the operation time stamp.
 Mutator createMutator(long timestamp)
          Create a mutator object with an arbitrary time stamp.
 Mutator createMutator(long timestamp, boolean deleteIfNull)
          Create a mutator object with an arbitrary time stamp.
 Mutator createMutator(long timestamp, boolean deleteIfNull, int ttl)
          Create a mutator object with an arbitrary time stamp.
 Mutator createMutator(long timestamp, int ttl)
          Create a mutator object with an arbitrary time stamp.
 RowDeletor createRowDeletor()
          Create a key deletor object using the current time as the operation time stamp.
 RowDeletor createRowDeletor(long timestamp)
          Create a key deletor object with an arbitrary time stamp.
 Selector createSelector()
          Create a selector object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.scale7.cassandra.pelops.pool.IThriftPool
getConnection, getConnectionExcept, getKeyspace, getOperandPolicy, shutdown
 

Constructor Detail

ThriftPoolBase

public ThriftPoolBase()
Method Detail

createSelector

public Selector createSelector()
Create a selector object..

Specified by:
createSelector in interface IThriftPool
Returns:
A new selector object

createMutator

public Mutator createMutator()
Create a mutator object using the current time as the operation time stamp. The mutator object must only be used to execute 1 mutation operation..

Specified by:
createMutator in interface IThriftPool
Returns:
A new mutator object

createMutator

public Mutator createMutator(long timestamp)
Create a mutator object with an arbitrary time stamp. The mutator object must only be used to execute 1 mutation operation.

The created mutator will be created with the value of OperandPolicy.isDeleteIfNull()..

Specified by:
createMutator in interface IThriftPool
Parameters:
timestamp - The default time stamp to use for operations
Returns:
A new mutator object

createMutator

public Mutator createMutator(long timestamp,
                             int ttl)
Description copied from interface: IThriftPool
Create a mutator object with an arbitrary time stamp. The mutator object must only be used to execute 1 mutation operation.

The created mutator will be created with the value of OperandPolicy.isDeleteIfNull().

Specified by:
createMutator in interface IThriftPool
Parameters:
timestamp - The default time stamp to use for operations
ttl - the ttl (in seconds) that columns created using the various Mutator.newColumn(org.scale7.cassandra.pelops.Bytes , org.scale7.cassandra.pelops.Bytes) will default to
Returns:
A new mutator object

createMutator

public Mutator createMutator(long timestamp,
                             boolean deleteIfNull)
Create a mutator object with an arbitrary time stamp. The mutator object must only be used to execute 1 mutation operation..

Specified by:
createMutator in interface IThriftPool
Parameters:
timestamp - The default time stamp to use for operations
deleteIfNull - If true the mutator will default to issuing deletes when it detects null values on a column passed to the various write methods.
Returns:
A new mutator object

createMutator

public Mutator createMutator(long timestamp,
                             boolean deleteIfNull,
                             int ttl)
Description copied from interface: IThriftPool
Create a mutator object with an arbitrary time stamp. The mutator object must only be used to execute 1 mutation operation.

Specified by:
createMutator in interface IThriftPool
Parameters:
timestamp - The default time stamp to use for operations
deleteIfNull - If true the mutator will default to issuing deletes when it detects null values on a column passed to the various write methods.
ttl - the ttl (in seconds) that columns created using the various Mutator.newColumn(org.scale7.cassandra.pelops.Bytes , org.scale7.cassandra.pelops.Bytes) will default to
Returns:
A new mutator object

createRowDeletor

public RowDeletor createRowDeletor()
Create a key deletor object using the current time as the operation time stamp..

Specified by:
createRowDeletor in interface IThriftPool
Returns:
A new key deletor object

createRowDeletor

public RowDeletor createRowDeletor(long timestamp)
Create a key deletor object with an arbitrary time stamp..

Specified by:
createRowDeletor in interface IThriftPool
Parameters:
timestamp - The default time stamp to use for operations
Returns:
A new key deletor object


Copyright © 2011. All Rights Reserved.