Enum Class CircuitState
- All Implemented Interfaces:
Serializable
,Comparable<CircuitState>
,java.lang.constant.Constable
Defines the states of circuit breaker.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CircuitState
Returns the enum constant of this class with the specified name.static CircuitState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLOSED
Initial state. All requests are sent to the remote service. -
OPEN
The circuit is tripped. All requests fail immediately without calling the remote service. -
HALF_OPEN
Only one trial request is sent at a time until at least one request succeeds or fails. If it doesn't complete within a certain time, another trial request will be sent again. All other requests fails immediately same as OPEN.
-
-
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
-