| Package | Description |
|---|---|
| net.jodah.failsafe |
Core Failsafe APIs for performing failsafe executions.
|
| Modifier and Type | Method and Description |
|---|---|
CircuitBreaker |
CircuitBreakerOpenException.getCircuitBreaker()
Retruns the
CircuitBreaker that caused the exception. |
CircuitBreaker<R> |
CircuitBreaker.onClose(CheckedRunnable runnable)
Calls the
runnable when the circuit is closed. |
CircuitBreaker<R> |
CircuitBreaker.onHalfOpen(CheckedRunnable runnable)
Calls the
runnable when the circuit is half-opened. |
CircuitBreaker<R> |
CircuitBreaker.onOpen(CheckedRunnable runnable)
Calls the
runnable when the circuit is opened. |
CircuitBreaker<R> |
CircuitBreaker.withDelay(Duration delay)
Sets the
delay to wait in open state before transitioning to half-open. |
CircuitBreaker<R> |
CircuitBreaker.withFailureThreshold(int failureThreshold)
Sets the number of successive failures that must occur when in a closed state in order to open the circuit.
|
CircuitBreaker<R> |
CircuitBreaker.withFailureThreshold(int failures,
int executions)
Sets the ratio of successive failures that must occur when in a closed state in order to open the circuit.
|
CircuitBreaker<R> |
CircuitBreaker.withSuccessThreshold(int successThreshold)
Sets the number of successive successful executions that must occur when in a half-open state in order to close the
circuit, else the circuit is re-opened when a failure occurs.
|
CircuitBreaker<R> |
CircuitBreaker.withSuccessThreshold(int successes,
int executions)
Sets the ratio of successive successful executions that must occur when in a half-open state in order to close the
circuit.
|
CircuitBreaker<R> |
CircuitBreaker.withTimeout(Duration timeout)
Deprecated.
Use
Timeout instead |
| Constructor and Description |
|---|
CircuitBreakerOpenException(CircuitBreaker circuitBreaker) |
Copyright © 2019. All rights reserved.