Enum Class NodeSelectionStrategy
- All Implemented Interfaces:
Serializable, Comparable<NodeSelectionStrategy>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOnce a node is found that returns responses successfully, use that node until a failure is received, then select a new node.Similar toPIN_UNTIL_ERROR, except will not shuffle the URLs throughout the lifetime of the client.For each new request, select the "next" node (in some undefined order). -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeSelectionStrategyReturns the enum constant of this class with the specified name.static NodeSelectionStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PIN_UNTIL_ERROR
Once a node is found that returns responses successfully, use that node until a failure is received, then select a new node. This strategy allows for the implementation to repin to a new node at any point in time. If this behavior is not desirable, you can usePIN_UNTIL_ERROR_WITHOUT_RESHUFFLE. -
ROUND_ROBIN
For each new request, select the "next" node (in some undefined order). -
PIN_UNTIL_ERROR_WITHOUT_RESHUFFLE
Similar toPIN_UNTIL_ERROR, except will not shuffle the URLs throughout the lifetime of the client.
-
-
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
-