Modifier and Type | Class and Description |
---|---|
static class |
Policies.Builder
A builder to create a new
Policies object. |
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(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 static EndPointFactory defaultEndPointFactory()
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()
public EndPointFactory getEndPointFactory()
Copyright © 2012–2023. All rights reserved.