Safe builder for a CircuitBreaker reference.
Safe builder for a CircuitBreaker reference.
is the maximum count for failures before opening the circuit breaker
is the timeout to wait in the Open
state
before attempting a close of the circuit breaker (but without
the backoff factor applied)
is a factor to use for resetting
the resetTimeout
when in the HalfOpen
state, in case
the attempt to Close
fails
is the maximum timeout the circuit breaker
is allowed to use when applying the exponentialBackoffFactor
is a callback for signaling rejected tasks, so every time a task execution is attempted and rejected in Open or HalfOpen states
is a callback for signaling transitions to the Closed state
is a callback for signaling transitions to HalfOpen
is a callback for signaling transitions to Open
is the PaddingStrategy to apply to the underlying atomic reference used, to use in case contention and "false sharing" become a problem
Unsafe builder, an alternative to CircuitBreaker[F].of for people knowing what they are doing.
Unsafe builder, an alternative to CircuitBreaker[F].of for people knowing what they are doing.
UNSAFE WARNING: this builder is unsafe to use
because creating a circuit breaker allocates shared mutable states,
which violates referential transparency. Prefer to use the safe
CircuitBreaker[F].of
and pass that CircuitBreaker
around as a plain parameter.
is the maximum count for failures before opening the circuit breaker
is the timeout to wait in the Open
state
before attempting a close of the circuit breaker (but without
the backoff factor applied)
is a factor to use for resetting
the resetTimeout
when in the HalfOpen
state, in case
the attempt to Close
fails
is the maximum timeout the circuit breaker
is allowed to use when applying the exponentialBackoffFactor
is a callback for signaling rejected tasks, so every time a task execution is attempted and rejected in Open or HalfOpen states
is a callback for signaling transitions to the Closed state
is a callback for signaling transitions to HalfOpen
is a callback for signaling transitions to Open
is the PaddingStrategy to apply to the underlying atomic reference used, to use in case contention and "false sharing" become a problem
Builders specified for CircuitBreaker, using the Partially-Applied Type technique.