Package io.micronaut.retry
Enum CircuitState
- java.lang.Object
-
- java.lang.Enum<CircuitState>
-
- io.micronaut.retry.CircuitState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CircuitState>
public enum CircuitState extends java.lang.Enum<CircuitState>
State for Circuit breaker phases.- Since:
- 1.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOSED
The circuit is closed and downstream logic should proceed as normal.HALF_OPEN
The circuit has just closed to allow a single downstream call to check if it is backup.OPEN
The circuit is open and downstream logic should not be invoked.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CircuitState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CircuitState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static CircuitState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CircuitState c : CircuitState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CircuitState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-