- All Implemented Interfaces:
Serializable
,Comparable<CircuitBreaker.State>
,Constable
- Enclosing interface:
CircuitBreaker
A circuit breaker can be in any of 3 possible states as defined by this enum.
The
CLOSED
state is the normal one; an
OPEN
state
indicates the circuit breaker is blocking requests and
HALF_OPEN
that a circuit breaker is transitioning to a CLOSED
state
provided enough successful requests are observed.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionCircuit is closed and requests are processed.Circuit is half open and some test requests are processed, others fail withCircuitBreakerOpenException
.Circuit is open and all requests fail withCircuitBreakerOpenException
. -
Method Summary
Modifier and TypeMethodDescriptionstatic CircuitBreaker.State
Returns the enum constant of this class with the specified name.static CircuitBreaker.State[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLOSED
Circuit is closed and requests are processed. -
HALF_OPEN
Circuit is half open and some test requests are processed, others fail withCircuitBreakerOpenException
. -
OPEN
Circuit is open and all requests fail withCircuitBreakerOpenException
.
-
-
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
-