AbstractCircuitBreaker.State¶
- protected static sealed enum org.apache.commons.lang3.concurrent.AbstractCircuitBreaker.State[source]¶
Enumerates the different states of a circuit breaker. This class also contains some logic for performing state transitions. This is done to avoid complex if-conditions in the code of
CircuitBreaker.
Fields and constants¶
The closed state. |
|
The open state. |
- public static final AbstractCircuitBreaker.State CLOSED[source]¶
The closed state.
- public static final AbstractCircuitBreaker.State OPEN[source]¶
The open state.
Methods¶
Returns the opposite state to the represented state. |
|
- public abstract AbstractCircuitBreaker.State oppositeState()[source]¶
Returns the opposite state to the represented state. This is useful for flipping the current state.
- Returns:
The opposite state
- public static AbstractCircuitBreaker.State valueOf(String name)¶
- public static AbstractCircuitBreaker.State[] values()¶