The initial State of the TaskCircuitBreaker.
The initial State of the TaskCircuitBreaker. While in this state the circuit breaker allows tasks to be executed.
Contract:
failures
counterfailures
counter reaches the maxFailures
count,
the breaker is tripped into the Open
state
is the current failures count
State of the TaskCircuitBreaker in which the circuit breaker has already allowed a task to go through, as a reset attempt, in order to test the connection.
State of the TaskCircuitBreaker in which the circuit breaker has already allowed a task to go through, as a reset attempt, in order to test the connection.
Contract:
Open
has expired is allowed through
without failing fast, just before the circuit breaker is
evolved into the HalfOpen
stateHalfOpen
fail-fast with an exception
just as in Open stateClosed
state, with the resetTimeout
and the
failures
count also reset to initial valuesOpen
state (the resetTimeout
is multiplied by the
exponential backoff factor)
is the current resetTimeout
that was
applied to the previous Open
state, to be multiplied by
the exponential backoff factor for the next transition to
Open
, in case the reset attempt fails
State of the TaskCircuitBreaker in which the circuit breaker rejects all tasks with an ExecutionRejectedException.
State of the TaskCircuitBreaker in which the circuit breaker rejects all tasks with an ExecutionRejectedException.
Contract:
ExecutionRejectedException
resetTimeout
, the circuit breaker
enters a HalfOpen state, allowing one task to go through
for testing the connection
is the timestamp in milliseconds since the
epoch when the transition to Open
happened
is the current resetTimeout
that is
applied to this Open
state, to be multiplied by the
exponential backoff factor for the next transition from
HalfOpen
to Open
, in case the reset attempt fails
An enumeration that models the internal state of TaskCircuitBreaker, kept in an Atomic for synchronization.
An enumeration that models the internal state of TaskCircuitBreaker, kept in an Atomic for synchronization.
The initial state when initializing a TaskCircuitBreaker is Closed. The available states:
Type-alias to document timestamps specified in milliseconds, as returned by Scheduler.currentTimeMillis.
Builder for a TaskCircuitBreaker reference.
Builder for a TaskCircuitBreaker reference.
is the maximum count for failures before opening the circuit breaker
is the timeout to wait in the Open
state
before attempting a close of the circuit breaker (but
without the backoff factor applied)
is a factor to use for resetting
the resetTimeout
when in the HalfOpen
state, in case
the attempt to Close
fails
is the maximum timeout the circuit breaker
is allowed to use when applying the exponentialBackoffFactor
is for signaling rejected tasks
is for signaling a transition to Closed
is for signaling a transition to HalfOpen
is for signaling a transition to Open
is the PaddingStrategy to apply to the underlying atomic reference used, to use in case contention and "false sharing" become a problem