Package | Description |
---|---|
dev.failsafe |
APIs for performing failsafe executions.
|
Modifier and Type | Method and Description |
---|---|
Fallback<R> |
FallbackBuilder.build()
Builds a new
Fallback using the builder's configuration. |
static Fallback<Void> |
Fallback.none()
Returns a fallback that will return a null if execution fails.
|
static <R> Fallback<R> |
Fallback.of(CheckedConsumer<ExecutionAttemptedEvent<? extends R>> fallback)
Returns the
fallback to be executed if execution fails. |
static <R> Fallback<R> |
Fallback.of(CheckedFunction<ExecutionAttemptedEvent<? extends R>,? extends R> 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. |
static <R> Fallback<R> |
Fallback.of(CheckedSupplier<? extends R> fallback)
Returns the
fallback to be executed if execution fails. |
static <R> Fallback<R> |
Fallback.of(R fallbackResult)
Returns the
fallbackResult to be provided if execution fails. |
static <R> Fallback<R> |
Fallback.ofException(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> Fallback<R> |
Fallback.ofStage(CheckedFunction<ExecutionAttemptedEvent<? extends R>,? extends CompletionStage<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.