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()
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()
ExponentialReconnectionPolicy
where the base delay is 1 second and the max delay is 10 minutes;public static RetryPolicy defaultRetryPolicy()
DefaultRetryPolicy
.public static AddressTranslator defaultAddressTranslator()
IdentityTranslator
.public static TimestampGenerator defaultTimestampGenerator()
AtomicMonotonicTimestampGenerator
.public static SpeculativeExecutionPolicy defaultSpeculativeExecutionPolicy()
NoSpeculativeExecutionPolicy
.public LoadBalancingPolicy getLoadBalancingPolicy()
public ReconnectionPolicy getReconnectionPolicy()
public RetryPolicy getRetryPolicy()
public AddressTranslator getAddressTranslator()
public TimestampGenerator getTimestampGenerator()
public SpeculativeExecutionPolicy getSpeculativeExecutionPolicy()
Copyright © 2012–2017. All rights reserved.