Class HectorCassandraClientConfigurer
java.lang.Object
org.openspaces.persistency.cassandra.HectorCassandraClientConfigurer
A configurer for creating
HectorCassandraClient instances.- Since:
- 9.1.1
- Author:
- Dan Kilman
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Integerprotected Stringprotected Stringprotected Integerprotected CassandraConsistencyLevelprotected CassandraConsistencyLevel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclusterName(String clusterName) (Optional) Sets the cluster name used internally by the hector library.columnFamilyGcGraceSeconds(Integer columnFamilyGcGraceSeconds) (Optional) Sets the gcGraceSeconds that will be used when creating column families for types.create()Cassandra hostskeyspaceName(String keyspaceName) Sets the keyspaceName of the keyspace to connect to.Sets the port matching the host name of the Cassandra cluster to connect to.readConsistencyLevel(CassandraConsistencyLevel readConsistencyLevel) (Optional)writeConsistencyLevel(CassandraConsistencyLevel writeConsistencyLevel) (Optional)
-
Field Details
-
hosts
-
port
-
clusterName
-
keyspaceName
-
columnFamilyGcGraceSeconds
-
readConsistencyLevel
-
writeConsistencyLevel
-
-
Constructor Details
-
HectorCassandraClientConfigurer
public HectorCassandraClientConfigurer()
-
-
Method Details
-
hosts
Cassandra hosts- Parameters:
hosts- Command delimited list of Cassandra hosts (hostnames or ipaddresses)- Returns:
thisinstance.
-
port
Sets the port matching the host name of the Cassandra cluster to connect to.- Parameters:
port- The cassandra port. Set null to use the default port numberCassandraHost.DEFAULT_PORT- Returns:
thisinstance.
-
keyspaceName
Sets the keyspaceName of the keyspace to connect to.- Parameters:
keyspaceName- The keyspace name.- Returns:
thisinstance.
-
clusterName
(Optional) Sets the cluster name used internally by the hector library. Use this if you plan to connect to more than one cassandra cluster in the same JVM.- Parameters:
clusterName- The cluster 'tag' name.- Returns:
thisinstance.
-
columnFamilyGcGraceSeconds
public HectorCassandraClientConfigurer columnFamilyGcGraceSeconds(Integer columnFamilyGcGraceSeconds) (Optional) Sets the gcGraceSeconds that will be used when creating column families for types. If null will use default value- Returns:
thisinstance.
-
readConsistencyLevel
public HectorCassandraClientConfigurer readConsistencyLevel(CassandraConsistencyLevel readConsistencyLevel) (Optional)- Parameters:
readConsistencyLevel- The consistencly level used for read by id operations. (default:CassandraConsistencyLevel.QUORUM)- Returns:
thisinstance.
-
writeConsistencyLevel
public HectorCassandraClientConfigurer writeConsistencyLevel(CassandraConsistencyLevel writeConsistencyLevel) (Optional)- Parameters:
writeConsistencyLevel- The consistencly level used for write/update/remove operations. (default:CassandraConsistencyLevel.QUORUM)- Returns:
- HectorCassandraClientConfigurer
-
create
- Returns:
- An instance of
HectorCassandraClientmatching this configurer configuration.
-