public class CassandraClientOptions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HOST
Default host for connecting with Cassandra service.
|
static int |
DEFAULT_PORT
Default port for connecting with Cassandra service.
|
Constructor and Description |
---|
CassandraClientOptions()
Default constructor.
|
CassandraClientOptions(CassandraClientOptions other)
Copy constructor.
|
CassandraClientOptions(com.datastax.driver.core.Cluster.Builder builder)
Constructor using an existing
Cluster.Builder instance. |
CassandraClientOptions(JsonObject json)
Constructor to create options from JSON.
|
Modifier and Type | Method and Description |
---|---|
CassandraClientOptions |
addContactPoint(String address)
Add a address, where a cluster node is located.
|
com.datastax.driver.core.Cluster.Builder |
dataStaxClusterBuilder() |
List<String> |
getContactPoints() |
String |
getKeyspace() |
CassandraClientOptions |
setContactPoints(List<String> contactPoints)
Set a list of hosts, where some of cluster nodes is located.
|
CassandraClientOptions |
setKeyspace(String keyspace)
Set the keyspace to use when creating the Cassandra session.
|
CassandraClientOptions |
setPort(int port)
Set which port should be used for all the hosts to connect to a cassandra service.
|
JsonObject |
toJson() |
public static final int DEFAULT_PORT
public static final String DEFAULT_HOST
public CassandraClientOptions()
public CassandraClientOptions(CassandraClientOptions other)
public CassandraClientOptions(com.datastax.driver.core.Cluster.Builder builder)
Cluster.Builder
instance.public CassandraClientOptions(JsonObject json)
json
- the JSONpublic JsonObject toJson()
public CassandraClientOptions setContactPoints(List<String> contactPoints)
contactPoints
- the list of hostspublic CassandraClientOptions setPort(int port)
port
- the portpublic CassandraClientOptions addContactPoint(String address)
address
- the addresspublic List<String> getContactPoints()
public com.datastax.driver.core.Cluster.Builder dataStaxClusterBuilder()
public String getKeyspace()
public CassandraClientOptions setKeyspace(String keyspace)
null
.keyspace
- the keyspace to use when creating the Cassandra sessionCopyright © 2023 Eclipse. All rights reserved.