Constructor and Description |
---|
Policies() |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy)
Creates a new
Policies object using the provided policies. |
Modifier and Type | Method and Description |
---|---|
static LoadBalancingPolicy |
defaultLoadBalancingPolicy()
The default load balancing policy.
|
static ReconnectionPolicy |
defaultReconnectionPolicy()
The default reconnection policy.
|
static RetryPolicy |
defaultRetryPolicy()
The default retry policy.
|
LoadBalancingPolicy |
getLoadBalancingPolicy()
The load balancing policy in use.
|
ReconnectionPolicy |
getReconnectionPolicy()
The reconnection policy in use.
|
RetryPolicy |
getRetryPolicy()
The retry policy in use.
|
public Policies()
public Policies(LoadBalancingPolicy loadBalancingPolicy, ReconnectionPolicy reconnectionPolicy, RetryPolicy retryPolicy)
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.public static LoadBalancingPolicy defaultLoadBalancingPolicy()
The default load balancing policy is RoundRobinPolicy
.
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 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.
Copyright © 2014. All Rights Reserved.