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

<init>

Closed(failures: Int)

The initial State of the CircuitBreaker. While in this state, the circuit breaker allows tasks to be executed.

Contract:

  • Exceptions increment the failures counter.
  • Successes reset the failure count to zero.
  • When the failures counter reaches the maxFailures count, the breaker is tripped into the CircuitBreaker.Open state.

Parameters

failures - is the current failures count

Do you like Arrow?

Arrow Org
<