| Package | Description |
|---|---|
| net.jodah.failsafe |
Core Failsafe APIs for performing failsafe executions.
|
| Modifier and Type | Method and Description |
|---|---|
static <R> Fallback<R> |
Fallback.of(CheckedRunnable fallback)
Returns the
fallback to be executed if execution fails. |
static <R> Fallback<R> |
Fallback.ofAsync(CheckedRunnable fallback)
Returns the
fallback to be executed asynchronously if execution fails. |
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. |
void |
FailsafeExecutor.run(CheckedRunnable runnable)
Executes the
runnable until successful or until the configured policies are exceeded. |
CompletableFuture<Void> |
FailsafeExecutor.runAsync(CheckedRunnable runnable)
Executes the
runnable asynchronously until successful or until the configured policies are exceeded. |
Copyright © 2021. All rights reserved.