Open

class Open : CircuitBreaker.State

When the CircuitBreaker is in the Open state it will short-circuit/fail-fast all requests - All requests short-circuit/fail-fast with ExecutionRejected - If a request is made after the configured resetTimeout passes, the CircuitBreaker is tripped into the a HalfOpen state, allowing one request to go through as a test.

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.

Constructors

Link copied to clipboard
fun Open(startedAt: Long, resetTimeoutNanos: Double)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val expiresAt: Long

The timestamp in milliseconds since the epoch, specifying when the Open state is to transition to HalfOpen.

Link copied to clipboard
val resetTimeoutNanos: Double
Link copied to clipboard
val startedAt: Long