Modifier and Type | Class and Description |
---|---|
static class |
Policies.Builder
A builder to create a new
Policies object. |
Constructor and Description |
---|
Policies()
Deprecated.
this constructor is provided for backward compatibility.
Use
builder() instead. |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy)
Deprecated.
this constructor is provided for backward compatibility.
Use
builder() instead. |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy,
AddressTranslater addressTranslater)
Deprecated.
this constructor is provided for backward compatibility.
Use
builder() instead. |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy,
AddressTranslater addressTranslater,
SpeculativeExecutionPolicy speculativeExecutionPolicy)
Deprecated.
this constructor is provided for backward compatibility.
Use
builder() instead. |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy,
AddressTranslater addressTranslater,
TimestampGenerator timestampGenerator)
Deprecated.
this constructor is provided for backward compatibility.
Use
builder() instead. |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy,
AddressTranslater addressTranslater,
TimestampGenerator timestampGenerator,
SpeculativeExecutionPolicy speculativeExecutionPolicy)
Deprecated.
this constructor is exposed for backward compatibility.
Use
builder() instead. |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy,
SpeculativeExecutionPolicy speculativeExecutionPolicy)
Deprecated.
this constructor is provided for backward compatibility.
Use
builder() instead. |
Modifier and Type | Method and Description |
---|---|
static Policies.Builder |
builder()
Returns a builder to create a new
Policies object. |
static AddressTranslater |
defaultAddressTranslater()
The default address translater.
|
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.
|
AddressTranslater |
getAddressTranslater()
The address translater 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.
|
@Deprecated public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy, AddressTranslater addressTranslater, TimestampGenerator timestampGenerator, SpeculativeExecutionPolicy speculativeExecutionPolicy)
builder()
instead.@Deprecated public Policies()
builder()
instead.public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy)
builder()
instead.public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy, AddressTranslater addressTranslater)
builder()
instead.public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy, SpeculativeExecutionPolicy speculativeExecutionPolicy)
builder()
instead.public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy, AddressTranslater addressTranslater, TimestampGenerator timestampGenerator)
builder()
instead.public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy, AddressTranslater addressTranslater, SpeculativeExecutionPolicy speculativeExecutionPolicy)
builder()
instead.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 AddressTranslater defaultAddressTranslater()
IdentityTranslater
.public static TimestampGenerator defaultTimestampGenerator()
ServerSideTimestampGenerator
.public static SpeculativeExecutionPolicy defaultSpeculativeExecutionPolicy()
NoSpeculativeExecutionPolicy
.public LoadBalancingPolicy getLoadBalancingPolicy()
public ReconnectionPolicy getReconnectionPolicy()
public RetryPolicy getRetryPolicy()
public AddressTranslater getAddressTranslater()
public TimestampGenerator getTimestampGenerator()
public SpeculativeExecutionPolicy getSpeculativeExecutionPolicy()