|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scale7.cassandra.pelops.Pelops
public class Pelops
Constructor Summary | |
---|---|
Pelops()
|
Method Summary | |
---|---|
static void |
addPool(String poolName,
Cluster cluster,
String keyspace)
Add a new Thrift connection pool for a specific cluster and keyspace. |
static void |
addPool(String poolName,
Cluster cluster,
String keyspace,
CommonsBackedPool.Policy policy,
OperandPolicy operandPolicy)
Add a new Thrift connection pool for a specific cluster and keyspace. |
static void |
addPool(String poolName,
Cluster cluster,
String keyspace,
OperandPolicy operandPolicy,
CachePerNodePool.Policy poolPolicy)
Deprecated. Use the CommonsBackedPool |
static void |
addPool(String poolName,
IThriftPool thriftPool)
Add an already instantiated instance of IThriftPool to pelops. |
static ClusterManager |
createClusterManager(Cluster cluster)
Create a ClusterManager object for use managing the cluster. |
static ColumnFamilyManager |
createColumnFamilyManager(Cluster cluster,
String keyspace)
Create a ColumnFamilyManager object for use managing column families inside a keyspace. |
static KeyspaceManager |
createKeyspaceManager(Cluster cluster)
Create a KeyspaceManager object for use managing keyspaces in the cluster. |
static Mutator |
createMutator(String poolName)
Create a Mutator object using the current time as the operation time stamp. |
static Mutator |
createMutator(String poolName,
long timestamp)
Create a Mutator object with an arbitrary time stamp. |
static Mutator |
createMutator(String poolName,
long timestamp,
boolean deleteIfNull)
Create a Mutator object with an arbitrary time stamp. |
static RowDeletor |
createRowDeletor(String poolName)
Create a row deletor object using the current time as the operation time stamp. |
static RowDeletor |
createRowDeletor(String poolName,
long timestamp)
Create a row deletor object with an arbitrary time stamp. |
static Selector |
createSelector(String poolName)
Create a Selector object. |
static IThriftPool |
getDbConnPool(String poolName)
Get a direct reference to a DbConnPool. |
static void |
shutdown()
Shutdown Pelops. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Pelops()
Method Detail |
---|
public static void addPool(String poolName, Cluster cluster, String keyspace)
Mutator
and Selector
.
poolName
- A name used to reference the pool e.g. "MainDatabase" or "LucandraIndexes"cluster
- The Cassandra cluster that network connections will be made tokeyspace
- The keyspace in the Cassandra cluster against which pool operations will applypublic static void addPool(String poolName, Cluster cluster, String keyspace, CommonsBackedPool.Policy policy, OperandPolicy operandPolicy)
Mutator
and Selector
.
poolName
- A name used to reference the pool e.g. "MainDatabase" or "LucandraIndexes"cluster
- The Cassandra cluster that network connections will be made tokeyspace
- The keyspace in the Cassandra cluster against which pool operations will applypolicy
- The configuration used by the pooloperandPolicy
- The configuration used by the Operand
@Deprecated public static void addPool(String poolName, Cluster cluster, String keyspace, OperandPolicy operandPolicy, CachePerNodePool.Policy poolPolicy)
CommonsBackedPool
Mutator
and Selector
.
poolName
- A name used to reference the pool e.g. "MainDatabase" or "LucandraIndexes"cluster
- The Cassandra cluster that network connections will be made tokeyspace
- The keyspace in the Cassandra cluster against which pool operations will applyoperandPolicy
- Policy for behaviour of operations made by operands e.g. max operation retriespoolPolicy
- Policy for behaviour of pool e.g. target cached connection countpublic static void addPool(String poolName, IThriftPool thriftPool)
IThriftPool
to pelops.
poolName
- A name used to reference the pool e.g. "MainDatabase" or "LucandraIndexes"thriftPool
- an instance of the IThriftPool
interfacepublic static void shutdown()
public static Selector createSelector(String poolName)
Selector
object.
poolName
- The name of the connection pool to use (this determines the Cassandra database cluster)
Selector
objectpublic static Mutator createMutator(String poolName)
Mutator
object using the current time as the operation time stamp. The Mutator
object
must only be used to execute 1 mutation operation.
poolName
- The name of the connection pool to use (this determines the Cassandra database cluster)
Mutator
objectpublic static Mutator createMutator(String poolName, long timestamp)
Mutator
object with an arbitrary time stamp. The Mutator
object
must only be used to execute 1 mutation operation.
poolName
- The name of the connection pool to use (this determines the Cassandra database cluster)timestamp
- The default time stamp to use for operations
Mutator
objectpublic static Mutator createMutator(String poolName, long timestamp, boolean deleteIfNull)
Mutator
object with an arbitrary time stamp. The Mutator
object
must only be used to execute 1 mutation operation.
poolName
- The name of the connection pool to use (this determines the Cassandra database cluster)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
objectpublic static RowDeletor createRowDeletor(String poolName)
row deletor
object using the current time as the operation time stamp.
poolName
- The name of the connection pool to use (this determines the Cassandra database cluster)
row deletor
objectpublic static RowDeletor createRowDeletor(String poolName, long timestamp)
row deletor
object with an arbitrary time stamp.
poolName
- The name of the connection pool to use (this determines the Cassandra database cluster)timestamp
- The default time stamp to use for operations
row deletor
objectpublic static ClusterManager createClusterManager(Cluster cluster)
ClusterManager
object for use managing the cluster. For example, querying
the version of the Cassandra software, or the cluster name.
cluster
-
public static KeyspaceManager createKeyspaceManager(Cluster cluster)
KeyspaceManager
object for use managing keyspaces in the cluster. For example,
querying the list of keyspaces, or adding a new keyspace.
cluster
-
public static ColumnFamilyManager createColumnFamilyManager(Cluster cluster, String keyspace)
ColumnFamilyManager
object for use managing column families inside a keyspace. For
example, adding or removing a column family.
cluster
- keyspace
-
public static IThriftPool getDbConnPool(String poolName)
Mutator
and
Selector
in normal usage. The reason this function is provided, is so that the Pelops connection pooling system can be
used in conjunction with other systems such as Lucandra.
poolName
- The name of the pool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |