public class Configuration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Configuration.Builder
A builder to create a new
Configuration object. |
Modifier | Constructor and Description |
---|---|
protected |
Configuration(Configuration toCopy)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
static Configuration.Builder |
builder()
Returns a builder to create a new
Configuration object. |
CodecRegistry |
getCodecRegistry()
Returns the
CodecRegistry instance for this configuration. |
MetricsOptions |
getMetricsOptions()
Returns the metrics configuration, if metrics are enabled.
|
NettyOptions |
getNettyOptions()
Returns the
NettyOptions instance for this configuration. |
Policies |
getPolicies()
Returns the policies set for the cluster.
|
PoolingOptions |
getPoolingOptions()
Returns the connection pooling configuration.
|
ProtocolOptions |
getProtocolOptions()
Returns the Cassandra binary protocol level configuration (compression).
|
QueryOptions |
getQueryOptions()
Returns the queries configuration.
|
SocketOptions |
getSocketOptions()
Returns the low-level TCP configuration options used (tcpNoDelay, keepAlive, ...).
|
ThreadingOptions |
getThreadingOptions() |
protected Configuration(Configuration toCopy)
toCopy
- the object to copy from.public static Configuration.Builder builder()
Configuration
object.
You only need this if you are building the configuration yourself. If you
use Cluster.builder()
, it will be done under the hood for you.public Policies getPolicies()
public SocketOptions getSocketOptions()
public ProtocolOptions getProtocolOptions()
public PoolingOptions getPoolingOptions()
public MetricsOptions getMetricsOptions()
Cluster.Builder.withoutMetrics()
.null
if metrics are not enabled.public QueryOptions getQueryOptions()
public ThreadingOptions getThreadingOptions()
public NettyOptions getNettyOptions()
NettyOptions
instance for this configuration.NettyOptions
instance for this configuration.public CodecRegistry getCodecRegistry()
CodecRegistry
instance for this configuration.
Note that this method could return CodecRegistry.DEFAULT_INSTANCE
if no specific codec registry has been set on the Cluster
.
In this case, care should be taken when registering new codecs as they would be
immediately available to other Cluster
instances sharing the same default instance.CodecRegistry
instance for this configuration.Copyright © 2012–2017. All rights reserved.