|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IThriftPool
The contract for connection pools used by pelops.
Nested Class Summary | |
---|---|
static interface |
IThriftPool.IPooledConnection
Defines an encapsulation for a connection to a Cassandra node. |
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. |
IThriftPool.IPooledConnection |
getConnection()
Get a connection from the pool. |
IThriftPool.IPooledConnection |
getConnectionExcept(String notNode)
Get a connection from the pool trying to avoid the node specified by the notNode param. |
String |
getKeyspace()
The keyspace this connection operates on. |
OperandPolicy |
getOperandPolicy()
Get the current policy in force, which controls the general behavior of pelops. |
void |
shutdown()
Shuts down the pool. |
Method Detail |
---|
Selector createSelector()
selector
object.
selector
objectMutator createMutator()
mutator
object using the current time as the operation time stamp.
The mutator
object must only be used to execute 1 mutation operation.
mutator
objectMutator createMutator(long timestamp)
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()
.
timestamp
- The default time stamp to use for operations
mutator
objectMutator createMutator(long timestamp, int ttl)
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()
.
timestamp
- The default time stamp to use for operationsttl
- 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
mutator
objectMutator createMutator(long timestamp, boolean deleteIfNull)
mutator
object with an arbitrary time stamp. The mutator
object
must only be used to execute 1 mutation operation.
timestamp
- The default time stamp to use for operationsdeleteIfNull
- If true the mutator will default to issuing deletes when it detects null values on a column
passed to the various write methods.
mutator
objectMutator createMutator(long timestamp, boolean deleteIfNull, int ttl)
mutator
object with an arbitrary time stamp. The mutator
object
must only be used to execute 1 mutation operation.
timestamp
- The default time stamp to use for operationsdeleteIfNull
- 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
mutator
objectRowDeletor createRowDeletor()
key deletor
object using the current time as the operation time stamp.
key deletor
objectRowDeletor createRowDeletor(long timestamp)
key deletor
object with an arbitrary time stamp.
timestamp
- The default time stamp to use for operations
key deletor
objectIThriftPool.IPooledConnection getConnection() throws NoConnectionsAvailableException
Exception
- if an error occurs
NoConnectionsAvailableException
IThriftPool.IPooledConnection getConnectionExcept(String notNode) throws NoConnectionsAvailableException
notNode
- the node to avoid if possible
Exception
- if an error occurs
NoConnectionsAvailableException
void shutdown()
Calling this method after the pool has been shutdown should have no affect.
OperandPolicy getOperandPolicy()
String getKeyspace()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |