Enum Class NodeSelectionStrategy

java.lang.Object
java.lang.Enum<NodeSelectionStrategy>
com.palantir.conjure.java.client.config.NodeSelectionStrategy
All Implemented Interfaces:
Serializable, Comparable<NodeSelectionStrategy>, Constable

public enum NodeSelectionStrategy extends Enum<NodeSelectionStrategy>
  • Enum Constant Details

    • PIN_UNTIL_ERROR

      public static final NodeSelectionStrategy 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 use PIN_UNTIL_ERROR_WITHOUT_RESHUFFLE.
    • ROUND_ROBIN

      public static final NodeSelectionStrategy ROUND_ROBIN
      For each new request, select the "next" node (in some undefined order).
    • PIN_UNTIL_ERROR_WITHOUT_RESHUFFLE

      public static final NodeSelectionStrategy PIN_UNTIL_ERROR_WITHOUT_RESHUFFLE
      Similar to PIN_UNTIL_ERROR, except will not shuffle the URLs throughout the lifetime of the client.
  • Method Details

    • values

      public static NodeSelectionStrategy[] 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

      public static NodeSelectionStrategy valueOf(String name)
      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 name
      NullPointerException - if the argument is null