common class HalfOpen : CircuitBreaker.State

The CircuitBreaker is in HalfOpen state while it’s allowing a test request to go through.

  • All other requests made while the test request is still running will short-circuit/fail-fast.
  • If the `test request` succeeds, then the [CircuitBreaker](../../index.html) is tripped back into [Closed](../-closed/index.html), with the reset timeout, and the failures count also reset to their initial values.
  • If the `test request` fails, then the [CircuitBreaker](../../index.html) is tripped back into [Open](../-open/index.html), the resetTimeout is multiplied by the exponentialBackoffFactor, up to the configured maxResetTimeout.



resetTimeoutNanos is the current reset timeout that the CircuitBreaker has to stay in Open state. When the reset timeout lapsed, than the CircuitBreaker will allow a test request to go through in HalfOpen. If the test request failed, the CircuitBreaker will go back into Open and it’ll multiply the resetTimeoutNanos with the the exponential backoff factor.


HalfOpen common fun HalfOpen(resetTimeoutNanos: Double)


Name Summary
equals common open operator override fun equals(other: Any?): Boolean
hashCode common open override fun hashCode(): Int
toString common open override fun toString(): String


Name Summary
resetTimeoutNanos common val resetTimeoutNanos: Double

Do you like Arrow?

Arrow Org