public class HectorCassandraClientConfigurer extends Object
HectorCassandraClient
instances.Modifier and Type | Field and Description |
---|---|
protected String |
clusterName |
protected Integer |
columnFamilyGcGraceSeconds |
protected String |
hosts |
protected String |
keyspaceName |
protected Integer |
port |
protected CassandraConsistencyLevel |
readConsistencyLevel |
protected CassandraConsistencyLevel |
writeConsistencyLevel |
Constructor and Description |
---|
HectorCassandraClientConfigurer() |
Modifier and Type | Method and Description |
---|---|
HectorCassandraClientConfigurer |
clusterName(String clusterName)
(Optional) Sets the cluster name used internally by the hector library.
|
HectorCassandraClientConfigurer |
columnFamilyGcGraceSeconds(Integer columnFamilyGcGraceSeconds)
(Optional) Sets the gcGraceSeconds that will be used when creating column families for types.
|
HectorCassandraClient |
create() |
HectorCassandraClientConfigurer |
hosts(String hosts)
Cassandra hosts
|
HectorCassandraClientConfigurer |
keyspaceName(String keyspaceName)
Sets the keyspaceName of the keyspace to connect to.
|
HectorCassandraClientConfigurer |
port(Integer port)
Sets the port matching the host name of the Cassandra cluster to connect to.
|
HectorCassandraClientConfigurer |
readConsistencyLevel(CassandraConsistencyLevel readConsistencyLevel)
(Optional)
|
HectorCassandraClientConfigurer |
writeConsistencyLevel(CassandraConsistencyLevel writeConsistencyLevel)
(Optional)
|
protected String hosts
protected Integer port
protected String clusterName
protected String keyspaceName
protected Integer columnFamilyGcGraceSeconds
protected CassandraConsistencyLevel readConsistencyLevel
protected CassandraConsistencyLevel writeConsistencyLevel
public HectorCassandraClientConfigurer hosts(String hosts)
hosts
- Command delimited list of Cassandra hosts (hostnames or ipaddresses)this
instance.public HectorCassandraClientConfigurer port(Integer port)
port
- The cassandra port. Set null to use the default port number CassandraHost.DEFAULT_PORT
this
instance.public HectorCassandraClientConfigurer keyspaceName(String keyspaceName)
keyspaceName
- The keyspace name.this
instance.public HectorCassandraClientConfigurer clusterName(String clusterName)
clusterName
- The cluster 'tag' name.this
instance.public HectorCassandraClientConfigurer columnFamilyGcGraceSeconds(Integer columnFamilyGcGraceSeconds)
this
instance.public HectorCassandraClientConfigurer readConsistencyLevel(CassandraConsistencyLevel readConsistencyLevel)
readConsistencyLevel
- The consistencly level used for read by id operations. (default:
CassandraConsistencyLevel.QUORUM
)this
instance.public HectorCassandraClientConfigurer writeConsistencyLevel(CassandraConsistencyLevel writeConsistencyLevel)
writeConsistencyLevel
- The consistencly level used for write/update/remove operations.
(default: CassandraConsistencyLevel.QUORUM
)public HectorCassandraClient create()
HectorCassandraClient
matching this configurer configuration.Copyright © GigaSpaces.