Package | Description |
---|---|
org.apache.commons.lang3.concurrent |
Provides support classes for multi-threaded programming.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.atomic.AtomicReference<AbstractCircuitBreaker.State> |
AbstractCircuitBreaker.state
The current state of this circuit breaker.
|
private static java.util.Map<AbstractCircuitBreaker.State,EventCountCircuitBreaker.StateStrategy> |
EventCountCircuitBreaker.STRATEGY_MAP
A map for accessing the strategy objects for the different states.
|
Modifier and Type | Method and Description |
---|---|
abstract AbstractCircuitBreaker.State |
AbstractCircuitBreaker.State.oppositeState()
Returns the opposite state to the represented state.
|
static AbstractCircuitBreaker.State |
AbstractCircuitBreaker.State.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AbstractCircuitBreaker.State[] |
AbstractCircuitBreaker.State.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
private static java.util.Map<AbstractCircuitBreaker.State,EventCountCircuitBreaker.StateStrategy> |
EventCountCircuitBreaker.createStrategyMap()
Creates the map with strategy objects.
|
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractCircuitBreaker.changeState(AbstractCircuitBreaker.State newState)
Changes the internal state of this circuit breaker.
|
private void |
EventCountCircuitBreaker.changeStateAndStartNewCheckInterval(AbstractCircuitBreaker.State newState)
Changes the state of this circuit breaker and also initializes a new
CheckIntervalData object. |
protected static boolean |
AbstractCircuitBreaker.isOpen(AbstractCircuitBreaker.State state)
Converts the given state value to a boolean open property.
|
private EventCountCircuitBreaker.CheckIntervalData |
EventCountCircuitBreaker.nextCheckIntervalData(int increment,
EventCountCircuitBreaker.CheckIntervalData currentData,
AbstractCircuitBreaker.State currentState,
long time)
Calculates the next
CheckIntervalData object based on the current data and
the current state. |
private static EventCountCircuitBreaker.StateStrategy |
EventCountCircuitBreaker.stateStrategy(AbstractCircuitBreaker.State state)
Returns the
StateStrategy object responsible for the given state. |