Package org.apache.cassandra.config
Enum Class Config.BatchlogEndpointStrategy
java.lang.Object
java.lang.Enum<Config.BatchlogEndpointStrategy>
org.apache.cassandra.config.Config.BatchlogEndpointStrategy
- All Implemented Interfaces:
Serializable,Comparable<Config.BatchlogEndpointStrategy>,Constable
- Enclosing class:
- Config
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStrategy usingConfig.dynamic_snitch(DynamicEndpointSnitch) to select batchlog storage endpoints.Strategy usingConfig.dynamic_snitch(DynamicEndpointSnitch) to select batchlog storage endpoints.Random, except that one of the replications will go to the local rack.Old, conventional strategy to select batchlog storage endpoints. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanIf true, one of the selected nodes will come from the local rack.final booleanIf true, dynamic snitch response times will be used to select more responsive nodes to write the batchlog to. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static Config.BatchlogEndpointStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
random_remote
Old, conventional strategy to select batchlog storage endpoints. Purely random, prevents the local rack, if possible. -
prefer_local
Random, except that one of the replications will go to the local rack. Which means this strategy offers lower availability guarantees thanrandom_remoteordynamic_remote. -
dynamic_remote
Strategy usingConfig.dynamic_snitch(DynamicEndpointSnitch) to select batchlog storage endpoints. Prevents the local rack, if possible. This strategy offers the same availability guarantees asrandom_remotebut selects the fastest endpoints according to theDynamicEndpointSnitch. Hint:DynamicEndpointSnitchtracks reads and not writes - i.e. write-only (or mostly-write) workloads might not benefit from this strategy. Note: this strategy will fall back torandom_remote, ifConfig.dynamic_snitchis not enabled. -
dynamic
Strategy usingConfig.dynamic_snitch(DynamicEndpointSnitch) to select batchlog storage endpoints. Does not prevent the local rack. Since the local rack is not excluded, this strategy offers lower availability guarantees thanrandom_remoteordynamic_remote. Hint:DynamicEndpointSnitchtracks reads and not writes - i.e. write-only (or mostly-write) workloads might not benefit from this strategy. Note: this strategy will fall back torandom_remote, ifConfig.dynamic_snitchis not enabled.
-
-
Field Details
-
useDynamicSnitchScores
public final boolean useDynamicSnitchScoresIf true, dynamic snitch response times will be used to select more responsive nodes to write the batchlog to. If false, nodes will be randomly selected. -
preferLocalRack
public final boolean preferLocalRackIf true, one of the selected nodes will come from the local rack. If false, the local rack will not be used except as a last resort with no other racks available.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-