Package | Description |
---|---|
com.datastax.driver.core |
The main package for the DataStax Java driver for Cassandra.
|
com.datastax.driver.core.policies |
Policies that allow to control some of the behavior of the DataStax Java driver for Cassandra.
|
Modifier and Type | Method and Description |
---|---|
Cluster.Builder |
Cluster.Builder.withLoadBalancingPolicy(LoadBalancingPolicy policy)
Configures the load balancing policy to use for the new cluster.
|
Modifier and Type | Interface and Description |
---|---|
interface |
ChainableLoadBalancingPolicy
A load balancing policy that wraps another policy.
|
interface |
CloseableLoadBalancingPolicy
A load balancing policy that wants to be notified at cluster shutdown.
|
Modifier and Type | Class and Description |
---|---|
class |
DCAwareRoundRobinPolicy
A data-center aware Round-robin load balancing policy.
|
class |
HostFilterPolicy
A load balancing policy wrapper that ensures that only hosts matching the predicate
will ever be returned.
|
class |
LatencyAwarePolicy
A wrapper load balancing policy that adds latency awareness to a child policy.
|
class |
RoundRobinPolicy
A Round-robin load balancing policy.
|
class |
TokenAwarePolicy
A wrapper load balancing policy that add token awareness to a child policy.
|
class |
WhiteListPolicy
A load balancing policy wrapper that ensure that only hosts from a provided
white list will ever be returned.
|
Modifier and Type | Method and Description |
---|---|
static LoadBalancingPolicy |
Policies.defaultLoadBalancingPolicy()
The default load balancing policy.
|
LoadBalancingPolicy |
TokenAwarePolicy.getChildPolicy() |
LoadBalancingPolicy |
LatencyAwarePolicy.getChildPolicy() |
LoadBalancingPolicy |
HostFilterPolicy.getChildPolicy() |
LoadBalancingPolicy |
ChainableLoadBalancingPolicy.getChildPolicy()
Returns the child policy.
|
LoadBalancingPolicy |
Policies.getLoadBalancingPolicy()
The load balancing policy in use.
|
Modifier and Type | Method and Description |
---|---|
static LatencyAwarePolicy.Builder |
LatencyAwarePolicy.builder(LoadBalancingPolicy childPolicy)
Creates a new latency aware policy builder given the child policy
that the resulting policy should wrap.
|
static HostFilterPolicy |
HostFilterPolicy.fromDCBlackList(LoadBalancingPolicy childPolicy,
Iterable<String> dcs)
Create a new policy that wraps the provided child policy but only "forbids" hosts
whose DC belongs to the provided list.
|
static HostFilterPolicy |
HostFilterPolicy.fromDCWhiteList(LoadBalancingPolicy childPolicy,
Iterable<String> dcs)
Create a new policy that wraps the provided child policy but only "allows" hosts
whose DC belongs to the provided list.
|
Constructor and Description |
---|
Builder(LoadBalancingPolicy childPolicy)
Creates a new latency aware policy builder given the child policy
that the resulting policy wraps.
|
HostFilterPolicy(LoadBalancingPolicy childPolicy,
com.google.common.base.Predicate<Host> predicate)
Create a new policy that wraps the provided child policy but only "allows" hosts
matching the predicate.
|
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy,
AddressTranslater addressTranslater,
SpeculativeExecutionPolicy speculativeExecutionPolicy)
Creates a new
Policies object using the provided policies. |
Policies(LoadBalancingPolicy loadBalancingPolicy,
ReconnectionPolicy reconnectionPolicy,
RetryPolicy retryPolicy,
SpeculativeExecutionPolicy speculativeExecutionPolicy)
Creates a new
Policies object using the provided policies. |
TokenAwarePolicy(LoadBalancingPolicy childPolicy)
Creates a new
TokenAware policy with shuffling of replicas. |
TokenAwarePolicy(LoadBalancingPolicy childPolicy,
boolean shuffleReplicas)
Creates a new
TokenAware policy. |
WhiteListPolicy(LoadBalancingPolicy childPolicy,
Collection<InetSocketAddress> whiteList)
Creates a new policy that wraps the provided child policy but only "allows" hosts
from the provided while list.
|
Copyright © 2012–2015. All rights reserved.