Package | Description |
---|---|
dev.failsafe |
APIs for performing failsafe executions.
|
Modifier and Type | Method and Description |
---|---|
EventListener<ExecutionAttemptedEvent<R>> |
RetryPolicyConfig.getFailedAttemptListener()
Returns the failed attempt event listener.
|
EventListener<ExecutionAttemptedEvent<R>> |
FallbackConfig.getFailedAttemptListener()
Returns the failed attempt event listener.
|
CheckedFunction<ExecutionAttemptedEvent<R>,R> |
FallbackConfig.getFallback()
Returns the fallback function, else
null if a fallback stage function was configured instead. |
CheckedFunction<ExecutionAttemptedEvent<R>,CompletableFuture<R>> |
FallbackConfig.getFallbackStage()
Returns the fallback stage function, else
null if a fallback function was configured instead. |
EventListener<ExecutionAttemptedEvent<R>> |
RetryPolicyConfig.getRetryListener()
Returns the retry event listener.
|
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.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> 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.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. |
RetryPolicyBuilder<R> |
RetryPolicyBuilder.onFailedAttempt(EventListener<ExecutionAttemptedEvent<R>> listener)
Registers the
listener to be called when an execution attempt 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. |
RetryPolicyBuilder<R> |
RetryPolicyBuilder.onRetry(EventListener<ExecutionAttemptedEvent<R>> listener)
Registers the
listener to be called when a retry is about to be attempted. |
Copyright © 2022. All rights reserved.