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

CLOSED

The closed state.

OPEN

The open state.

public static final AbstractCircuitBreaker.State CLOSED[source]

The closed state.

public static final AbstractCircuitBreaker.State OPEN[source]

The open state.

Methods

oppositeState()

Returns the opposite state to the represented state.

valueOf(String)

values()

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()