| 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.withFailureRateThreshold(int failureRateThreshold,
int failureExecutionThreshold,
Duration failureThresholdingPeriod)
Configures time based failure rate thresholding by setting the percentage rate of failures, from 1 to 100, that
must occur within the rolling
failureThresholdingPeriod when in a CLOSED state in order to open the
circuit. |
CircuitBreaker<R> |
CircuitBreaker.withFailureThreshold(int failureThreshold)
Configures count based failure thresholding by setting the number of consecutive failures that must occur when in a
CLOSED state in order to open the circuit.
|
CircuitBreaker<R> |
CircuitBreaker.withFailureThreshold(int failureThreshold,
Duration failureThresholdingPeriod)
Configures time based failure thresholding by setting the number of failures that must occur within the
failureThresholdingPeriod when in a CLOSED state in order to open the circuit. |
CircuitBreaker<R> |
CircuitBreaker.withFailureThreshold(int failureThreshold,
int failureThresholdingCapacity)
Configures count based failure thresholding by setting the ratio of successive failures to executions that must
occur when in a CLOSED state in order to open the circuit.
|
CircuitBreaker<R> |
CircuitBreaker.withFailureThreshold(int failureThreshold,
int failureExecutionThreshold,
Duration failureThresholdingPeriod)
Configures time based failure thresholding by setting the number of failures that must occur within the
failureThresholdingPeriod when in a CLOSED state in order to open the circuit. |
CircuitBreaker<R> |
CircuitBreaker.withSuccessThreshold(int successThreshold)
Configures count based success thresholding by setting the number of consecutive 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 successThreshold,
int successThresholdingCapacity)
Configures count based success thresholding by setting the ratio of successive successful executions that must
occur when in a HALF_OPEN state in order to close the circuit.
|
| Constructor and Description |
|---|
CircuitBreakerOpenException(CircuitBreaker circuitBreaker) |
Copyright © 2020. All rights reserved.