public enum LoadBalancingPolicyEnum extends Enum<LoadBalancingPolicyEnum>
Enum Constant and Description |
---|
DcAwareRoundRobinPolicy
A data-center aware Round-robin load balancing policy.
|
RoundRobinPolicy
Creates a load balancing policy that picks host to query in a round robin fashion (on all the
hosts of the Cassandra cluster).
|
Modifier and Type | Method and Description |
---|---|
abstract com.datastax.driver.core.policies.LoadBalancingPolicy |
getLoadBalancingPolicy() |
static LoadBalancingPolicyEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LoadBalancingPolicyEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LoadBalancingPolicyEnum RoundRobinPolicy
public static final LoadBalancingPolicyEnum DcAwareRoundRobinPolicy
This policy provides round-robin queries over the node of the local data center. It also includes in the query plans returned a configurable number of hosts in the remote data centers, but those are always tried after the local nodes. In other words, this policy guarantees that no host in a remote data center will be queried unless no host in the local data center can be reached.
If used with a single data center, this policy is equivalent to the RoundRobinPolicy
,
but its DC awareness incurs a slight overhead so the latter should be preferred to this policy in
that case.
public static LoadBalancingPolicyEnum[] values()
for (LoadBalancingPolicyEnum c : LoadBalancingPolicyEnum.values()) System.out.println(c);
public static LoadBalancingPolicyEnum valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract com.datastax.driver.core.policies.LoadBalancingPolicy getLoadBalancingPolicy()
Copyright © 2010–2019. All rights reserved.