Package | Description |
---|---|
dev.failsafe |
APIs for performing failsafe executions.
|
Modifier and Type | Method and Description |
---|---|
static <R> FallbackBuilder<R> |
Fallback.builder(CheckedSupplier<? extends R> fallback)
Returns the
fallback to be executed if execution fails. |
static <R> FallbackBuilder<R> |
Fallback.builderOfStage(CheckedSupplier<? extends CompletionStage<R>> fallback)
Returns the
fallback to be executed if execution fails. |
<T extends R> |
FailsafeExecutor.get(CheckedSupplier<T> supplier)
Executes the
supplier until a successful result is returned or the configured policies are exceeded. |
<T extends R> |
FailsafeExecutor.getAsync(CheckedSupplier<T> supplier)
Executes the
supplier asynchronously until a successful result is returned or the configured policies are
exceeded. |
<T extends R> |
FailsafeExecutor.getStageAsync(CheckedSupplier<? extends CompletionStage<T>> supplier)
Executes the
supplier asynchronously until the resulting future is successfully completed or the configured
policies are exceeded. |
static <R> Fallback<R> |
Fallback.of(CheckedSupplier<? extends R> fallback)
Returns the
fallback to be executed if execution fails. |
static <R> Fallback<R> |
Fallback.ofStage(CheckedSupplier<? extends CompletionStage<R>> fallback)
Returns the
fallback to be executed if execution fails. |
Copyright © 2022. All rights reserved.