public enum CircuitBreakerState extends Enum<CircuitBreakerState>
Enum Constant and Description |
---|
CLOSED
The
CLOSED state. |
HALF_OPEN
The
HALF_OPEN state. |
OPEN
The
OPEN state. |
Modifier and Type | Method and Description |
---|---|
static CircuitBreakerState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CircuitBreakerState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CircuitBreakerState OPEN
OPEN
state. The circuit breaker is executing the fallback, and switches to the HALF_OPEN
state after the specified time.public static final CircuitBreakerState CLOSED
CLOSED
state. The circuit breaker lets invocations pass and collects the failures. IF the number of
failures reach the specified threshold, the cricuit breaker switches to the OPEN
state.public static final CircuitBreakerState HALF_OPEN
HALF_OPEN
state. The circuit breaker has been opened, and is now checking the current situation. It
lets pass the next invocation and determines from the result (failure or success) if the circuit breaker can
be switched to the CLOSED
state again.public static CircuitBreakerState[] values()
for (CircuitBreakerState c : CircuitBreakerState.values()) System.out.println(c);
public static CircuitBreakerState valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2021 Eclipse. All rights reserved.