Package | Description |
---|---|
dev.failsafe |
APIs for performing failsafe executions.
|
Modifier and Type | Method and Description |
---|---|
static <R> FallbackBuilder<R> |
Fallback.builder(CheckedRunnable fallback)
Returns the
fallback to be executed if execution fails. |
static <R> Fallback<R> |
Fallback.of(CheckedRunnable fallback)
Returns the
fallback to be executed if execution fails. |
void |
ExecutionContext.onCancel(CheckedRunnable cancelCallback)
Sets the
cancelCallback to be called if the execution is cancelled, such as by the resulting Call
or CompletableFuture , or a Timeout . |
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 © 2022. All rights reserved.