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.
|
Modifier and Type | Class and Description |
---|---|
class |
DCAwareRoundRobinPolicy
A data-center aware Round-robin load balancing policy.
|
class |
ErrorAwarePolicy
Chainable load balancing policy that filters out hosts based on their error rates.
|
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 |
PagingOptimizingLoadBalancingPolicy |
class |
RoundRobinPolicy
A Round-robin load balancing policy.
|
class |
TokenAwarePolicy
A wrapper load balancing policy that adds 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 |
LatencyAwarePolicy.getChildPolicy() |
LoadBalancingPolicy |
ChainableLoadBalancingPolicy.getChildPolicy()
Returns the child policy.
|
LoadBalancingPolicy |
ErrorAwarePolicy.getChildPolicy() |
LoadBalancingPolicy |
TokenAwarePolicy.getChildPolicy() |
LoadBalancingPolicy |
HostFilterPolicy.getChildPolicy() |
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 ErrorAwarePolicy.Builder |
ErrorAwarePolicy.builder(LoadBalancingPolicy childPolicy)
Creates a new error 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.
|
static WhiteListPolicy |
WhiteListPolicy.ofHosts(LoadBalancingPolicy childPolicy,
Iterable<String> hostnames)
Creates a new policy that wraps the provided child policy but only "allows" hosts having
addresses that match those from the resolved input host names.
|
static WhiteListPolicy |
WhiteListPolicy.ofHosts(LoadBalancingPolicy childPolicy,
String... hostnames)
Creates a new policy with the given host names.
|
Policies.Builder |
Policies.Builder.withLoadBalancingPolicy(LoadBalancingPolicy loadBalancingPolicy)
Sets the load balancing policy.
|
Constructor and Description |
---|
Builder(LoadBalancingPolicy childPolicy)
Creates a new latency aware policy builder given the child policy that the resulting policy
wraps.
|
Builder(LoadBalancingPolicy childPolicy)
Creates a
ErrorAwarePolicy.Builder instance. |
HostFilterPolicy(LoadBalancingPolicy childPolicy,
Predicate<Host> predicate)
Create a new policy that wraps the provided child policy but only "allows" hosts matching the
predicate.
|
PagingOptimizingLoadBalancingPolicy(LoadBalancingPolicy loadBalancingPolicy) |
TokenAwarePolicy(LoadBalancingPolicy childPolicy)
Creates a new
TokenAware policy with RANDOM replica
ordering. |
TokenAwarePolicy(LoadBalancingPolicy childPolicy,
boolean shuffleReplicas)
Deprecated.
Use
TokenAwarePolicy(LoadBalancingPolicy, ReplicaOrdering) instead. This
constructor will be removed in the next major release. |
TokenAwarePolicy(LoadBalancingPolicy childPolicy,
TokenAwarePolicy.ReplicaOrdering replicaOrdering)
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 white list.
|
Copyright © 2012–2024. All rights reserved.