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.oss.driver.api.core.CqlSessionBuilder builder)
Constructor using an existing
CqlSessionBuilder instance. |
CassandraClientOptions(JsonObject json)
Constructor to create options from JSON.
|
Modifier and Type | Method and Description |
---|---|
CassandraClientOptions |
addContactPoint(InetSocketAddress address)
Adds a contact point to use for the initial connection to the cluster
|
CassandraClientOptions |
addContactPoint(String host,
int port)
Adds a contact point to use for the initial connection to the cluster
|
com.datastax.oss.driver.api.core.CqlSessionBuilder |
dataStaxClusterBuilder() |
String |
getKeyspace() |
String |
getPassword() |
TracingPolicy |
getTracingPolicy() |
String |
getUsername() |
CassandraClientOptions |
setKeyspace(String keyspace)
Set the keyspace to use when creating the Cassandra session.
|
CassandraClientOptions |
setPassword(String password)
Set the password for plaintext authentication.
|
CassandraClientOptions |
setTracingPolicy(TracingPolicy tracingPolicy)
Set the tracing policy for the client behavior when Vert.x has tracing enabled.
|
CassandraClientOptions |
setUsername(String username)
Set the username for plaintext authentication.
|
JsonObject |
toJson() |
public static final int DEFAULT_PORT
public static final String DEFAULT_HOST
public CassandraClientOptions()
public CassandraClientOptions(CassandraClientOptions other)
other
- The other client to copy from.public CassandraClientOptions(com.datastax.oss.driver.api.core.CqlSessionBuilder builder)
CqlSessionBuilder
instance.public CassandraClientOptions(JsonObject json)
json
- the JSONpublic JsonObject toJson()
public CassandraClientOptions addContactPoint(InetSocketAddress address)
address
- the addresspublic CassandraClientOptions addContactPoint(String host, int port)
host
- the addressport
- the portpublic com.datastax.oss.driver.api.core.CqlSessionBuilder dataStaxClusterBuilder()
public String getKeyspace()
public CassandraClientOptions setKeyspace(String keyspace)
null
.keyspace
- the keyspace to use when creating the Cassandra sessionpublic String getUsername()
public CassandraClientOptions setUsername(String username)
null
.username
- the username for plaintext authenticationpublic String getPassword()
public CassandraClientOptions setPassword(String password)
null
.password
- the username for plaintext authenticationpublic TracingPolicy getTracingPolicy()
public CassandraClientOptions setTracingPolicy(TracingPolicy tracingPolicy)
tracingPolicy
- the tracing policyCopyright © 2024 Eclipse. All rights reserved.