Maximum number of failures before opening the circuit
scala.concurrent.duration.FiniteDuration of time after which to consider a call a failure
scala.concurrent.duration.FiniteDuration of time after which to attempt to close the circuit
scala.concurrent.duration.FiniteDuration of time after which to consider a call a failure
Maximum number of failures before opening the circuit
Adds a callback to execute when circuit breaker state closes
Adds a callback to execute when circuit breaker state closes
The callback is run in the scala.concurrent.ExecutionContext supplied in the constructor.
Handler to be invoked on state change
CircuitBreaker for fluent usage
Adds a callback to execute when circuit breaker transitions to half-open
Adds a callback to execute when circuit breaker transitions to half-open
The callback is run in the scala.concurrent.ExecutionContext supplied in the constructor.
Handler to be invoked on state change
CircuitBreaker for fluent usage
Adds a callback to execute when circuit breaker opens
Adds a callback to execute when circuit breaker opens
The callback is run in the scala.concurrent.ExecutionContext supplied in the constructor.
Handler to be invoked on state change
CircuitBreaker for fluent usage
scala.concurrent.duration.FiniteDuration of time after which to attempt to close the circuit
Wraps invocations of asynchronous calls that need to be protected
Wraps invocations of asynchronous calls that need to be protected
Call needing protected
F containing the call result or a
scala.concurrent.TimeoutException
if the call timed out
Provides circuit breaker functionality to provide stability when working with "dangerous" operations, e.g. calls to remote systems
Transitions through three states: - In *Closed* state, calls pass through until the
maxFailures
count is reached. This causes the circuit breaker to open. Both exceptions and calls exceedingcallTimeout
are considered failures. - In *Open* state, calls fail-fast with an exception. AfterresetTimeout
, circuit breaker transitions to half-open state. - In *Half-Open* state, the first call will be allowed through, if it succeeds the circuit breaker will reset to closed state. If it fails, the circuit breaker will re-open to open state. All calls beyond the first that execute while the first is running will fail-fast with an exception.Maximum number of failures before opening the circuit
scala.concurrent.duration.FiniteDuration of time after which to consider a call a failure
scala.concurrent.duration.FiniteDuration of time after which to attempt to close the circuit