arrow-fx-coroutines / arrow.fx.coroutines / CircuitBreaker / State / Open / <init>

<init>

Open(startedAt: Long, resetTimeoutNanos: Double)

State of the CircuitBreaker in which the circuit breaker rejects all tasks with an ExecutionRejected.

Contract:

  • All tasks fail fast with ExecutionRejected.
  • After the configured resetTimeout, the circuit breaker enters a HalfOpen state, allowing one task to go through for testing the connection.

Parameters

startedAt - is the timestamp in milliseconds since the epoch when the transition to Open happened.

resetTimeoutNanos - 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 failsOpen(startedAt: Long, resetTimeout: Duration, awaitClose: Promise<Unit>)

Do you like Arrow?

Arrow Org
<