Package | Description |
---|---|
dev.failsafe |
APIs for performing failsafe executions.
|
Modifier and Type | Method and Description |
---|---|
static <R> FallbackBuilder<R> |
Fallback.builder(CheckedConsumer<ExecutionAttemptedEvent<? extends R>> fallback)
Returns the
fallback to be executed if execution fails. |
static <R> FallbackBuilder<R> |
Fallback.builder(CheckedFunction<ExecutionAttemptedEvent<? extends R>,? extends R> fallback)
Returns the
fallback to be executed if execution fails. |
static <R> FallbackBuilder<R> |
Fallback.builder(CheckedRunnable fallback)
Returns the
fallback to be executed if execution fails. |
static <R> FallbackBuilder<R> |
Fallback.builder(CheckedSupplier<? extends R> fallback)
Returns the
fallback to be executed if execution fails. |
static <R> FallbackBuilder<R> |
Fallback.builder(FallbackConfig<R> config)
Creates a new FallbackBuilder that will be based on the
config . |
static <R> FallbackBuilder<R> |
Fallback.builder(R fallbackResult)
Returns the
fallbackResult to be provided if execution fails. |
static <R> FallbackBuilder<R> |
Fallback.builderOfException(CheckedFunction<ExecutionAttemptedEvent<? extends R>,? extends Exception> fallback)
Returns the
fallback to be executed if execution fails and allows an alternative exception to be supplied
instead. |
static <R> FallbackBuilder<R> |
Fallback.builderOfStage(CheckedFunction<ExecutionAttemptedEvent<? extends R>,? extends CompletionStage<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. |
FallbackBuilder<R> |
FallbackBuilder.onFailedAttempt(EventListener<ExecutionAttemptedEvent<R>> listener)
Registers the
listener to be called when the last execution attempt prior to the fallback failed. |
FallbackBuilder<R> |
FallbackBuilder.withAsync()
Configures the fallback to run asynchronously.
|
Copyright © 2022. All rights reserved.