Constructor and Description |
---|
Policies() |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy)
Creates a new
Policies object using the provided policies. |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy,
AddressTranslater addressTranslater)
Creates a new
Policies object using the provided policies. |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy,
AddressTranslater addressTranslater,
TimestampGenerator timestampGenerator)
Creates a new
Policies object using the provided policies. |
Modifier and Type | Method and Description |
---|---|
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 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.
|
TimestampGenerator |
getTimestampGenerator()
The timestamp generator to use.
|
public Policies()
public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy)
Policies
object using the provided policies.
This constructor use the default IdentityTranslater
and TimestampGenerator
.
loadBalancingPolicy
- the load balancing policy to use.reconnectionPolicy
- the reconnection policy to use.retryPolicy
- the retry policy to use.public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy, AddressTranslater addressTranslater)
Policies
object using the provided policies.loadBalancingPolicy
- the load balancing policy to use.reconnectionPolicy
- the reconnection policy to use.retryPolicy
- the retry policy to use.addressTranslater
- the address translater to use.public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy, AddressTranslater addressTranslater, TimestampGenerator timestampGenerator)
Policies
object using the provided policies.loadBalancingPolicy
- the load balancing policy to use.reconnectionPolicy
- the reconnection policy to use.retryPolicy
- the retry policy to use.addressTranslater
- the address translater to use.timestampGenerator
- the timestamp generator to use.public static LoadBalancingPolicy defaultLoadBalancingPolicy()
The default load balancing policy is DCAwareRoundRobinPolicy
with token
awareness (so new TokenAwarePolicy(new DCAwareRoundRobinPolicy())
).
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 AddressTranslater defaultAddressTranslater()
The default address translater is IdentityTranslater
.
public static TimestampGenerator defaultTimestampGenerator()
This is an instance of ServerSideTimestampGenerator
.
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 AddressTranslater getAddressTranslater()
public TimestampGenerator getTimestampGenerator()
Copyright © 2014. All rights reserved.