Modifier and Type | Class and Description |
---|---|
static class |
Policies.Builder
A builder to create a new
Policies object. |
Modifier and Type | Method and Description |
---|---|
static Policies.Builder |
builder()
Returns a builder to create a new
Policies object. |
static AddressTranslator |
defaultAddressTranslator()
The default address translator.
|
static LoadBalancingPolicy |
defaultLoadBalancingPolicy()
The default load balancing policy.
|
static ReconnectionPolicy |
defaultReconnectionPolicy()
The default reconnection policy.
|
static RetryPolicy |
defaultRetryPolicy()
The default retry policy.
|
static SpeculativeExecutionPolicy |
defaultSpeculativeExecutionPolicy()
The default speculative retry policy.
|
static TimestampGenerator |
defaultTimestampGenerator()
The default timestamp generator.
|
AddressTranslator |
getAddressTranslator()
The address translator in use.
|
LoadBalancingPolicy |
getLoadBalancingPolicy()
The load balancing policy in use.
|
ReconnectionPolicy |
getReconnectionPolicy()
The reconnection policy in use.
|
RetryPolicy |
getRetryPolicy()
The retry policy in use.
|
SpeculativeExecutionPolicy |
getSpeculativeExecutionPolicy()
The speculative execution policy in use.
|
TimestampGenerator |
getTimestampGenerator()
The timestamp generator to use.
|
public static Policies.Builder builder()
Policies
object.public static LoadBalancingPolicy defaultLoadBalancingPolicy()
The default load balancing policy is DCAwareRoundRobinPolicy
with token awareness
(so new TokenAwarePolicy(new DCAwareRoundRobinPolicy())
).
Note that this policy shuffles the replicas when token awareness is used, see TokenAwarePolicy.TokenAwarePolicy(LoadBalancingPolicy, boolean)
for an explanation of the
tradeoffs.
public static ReconnectionPolicy defaultReconnectionPolicy()
The default reconnection policy is an ExponentialReconnectionPolicy
where the base
delay is 1 second and the max delay is 10 minutes;
public static RetryPolicy defaultRetryPolicy()
The default retry policy is DefaultRetryPolicy
.
public static AddressTranslator defaultAddressTranslator()
The default address translator is IdentityTranslator
.
public static TimestampGenerator defaultTimestampGenerator()
This is an instance of AtomicMonotonicTimestampGenerator
.
public static SpeculativeExecutionPolicy defaultSpeculativeExecutionPolicy()
The default speculative retry policy is a NoSpeculativeExecutionPolicy
.
public LoadBalancingPolicy getLoadBalancingPolicy()
The load balancing policy defines how Cassandra hosts are picked for queries.
public ReconnectionPolicy getReconnectionPolicy()
The reconnection policy defines how often the driver tries to reconnect to a dead node.
public RetryPolicy getRetryPolicy()
The retry policy defines in which conditions a query should be automatically retries by the driver.
public AddressTranslator getAddressTranslator()
public TimestampGenerator getTimestampGenerator()
public SpeculativeExecutionPolicy getSpeculativeExecutionPolicy()
Copyright © 2012–2018. All rights reserved.