public static enum TokenAwarePolicy.ReplicaOrdering extends Enum<TokenAwarePolicy.ReplicaOrdering>
|Enum Constant and Description|
Return the replicas in the exact same order in which they appear in the child policy's query plan.
Return replicas in a different, random order for each query plan.
Order replicas by token ring topology, i.e.
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final TokenAwarePolicy.ReplicaOrdering TOPOLOGICAL
This strategy is the only one guaranteed to order replicas in a deterministic and constant way. This increases the effectiveness of server-side row caching (especially at consistency level ONE), but is more heavily impacted by hotspots, since the primary replica is always tried first.
public static final TokenAwarePolicy.ReplicaOrdering RANDOM
This strategy fans out writes and thus can alleviate hotspots caused by "fat" partitions, but its randomness makes server-side caching less efficient.
public static final TokenAwarePolicy.ReplicaOrdering NEUTRAL
This is the only strategy that fully respects the child policy's replica ordering. Use it
when it is important to keep that order intact (e.g. when using the
public static TokenAwarePolicy.ReplicaOrdering values()
for (TokenAwarePolicy.ReplicaOrdering c : TokenAwarePolicy.ReplicaOrdering.values()) System.out.println(c);
public static TokenAwarePolicy.ReplicaOrdering valueOf(String name)
name- the name of the enum constant to be returned.
IllegalArgumentException- if this enum type has no constant with the specified name
NullPointerException- if the argument is null
Copyright © 2012–2023. All rights reserved.