Enum Class CircuitState

java.lang.Object
java.lang.Enum<CircuitState>
io.micronaut.retry.CircuitState
All Implemented Interfaces:
Serializable, Comparable<CircuitState>, Constable

public enum CircuitState extends Enum<CircuitState>
State for Circuit breaker phases.
Since:
1.0
Author:
graemerocher
  • Enum Constant Details

    • OPEN

      public static final CircuitState OPEN
      The circuit is open and downstream logic should not be invoked.
    • CLOSED

      public static final CircuitState CLOSED
      The circuit is closed and downstream logic should proceed as normal.
    • HALF_OPEN

      public static final CircuitState HALF_OPEN
      The circuit has just closed to allow a single downstream call to check if it is backup.
  • Method Details

    • values

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