State of the CircuitBreaker in which the circuit breaker rejects all tasks with an ExecutionRejectedException.
State of the CircuitBreaker in which the circuit breaker rejects all tasks with an ExecutionRejectedException.
Contract:
- all tasks fail fast with
ExecutionRejectedException
- after the configured
resetTimeout
, the circuit breaker enters a HalfOpen state, allowing one task to go through for testing the connection
- Value Params
- awaitClose
is a
Deferred
(pure promise) that will get completed when theCircuitBreaker
will switch to theClosed
state again; this reference isNone
in case theF[_]
used does not implementcats.effect.Async
, because only withAsync
data types we can wait for completion.- resetTimeout
is the current
resetTimeout
that is applied to thisOpen
state, to be multiplied by the exponential backoff factor for the next transition fromHalfOpen
toOpen
, in case the reset attempt fails- startedAt
is the timestamp in milliseconds since the epoch when the transition to
Open
happened
- Companion
- object