HalfOpen

data class HalfOpen(val nrOfCallsAttempted: Int, val startTimerMark: ComparableTimeMark?, val nrOfTransitionsToOpenStateInACycle: Int) : CircuitBreakerState(source)

Represents the state where the circuit breaker is HalfOpen, and only a limited/permitted number of calls are allowed to test if the underlying operation is still failing.

Parameters

nrOfCallsAttempted

The number of calls attempted in the HalfOpen state. If this number exceeds the configured maximum number of calls allowed in the HalfOpen state, subsequent calls will be rejected as the state will transition back to the Open state.

startTimerMark

The time mark at which the circuit breaker entered this state. Could be null if the maximum wait duration in this state was configured to be Duration.ZERO. Which means that the circuit breaker will wait indefinitely in this state, until all permitted calls have been attempted.

nrOfTransitionsToOpenStateInACycle

The number of times the circuit breaker has transitioned to the Open state in a cycle (i.e., Closed ->Open starts a new cycle).

Constructors

Link copied to clipboard
internal constructor(nrOfCallsAttempted: Int, startTimerMark: ComparableTimeMark?, nrOfTransitionsToOpenStateInACycle: Int)

Properties

Link copied to clipboard
Link copied to clipboard

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