| Package | Description |
|---|---|
| net.jodah.failsafe |
Core Failsafe APIs for performing failsafe executions.
|
| Modifier and Type | Method and Description |
|---|---|
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.ofAsync(CheckedConsumer<ExecutionAttemptedEvent<? extends R>> fallback)
Returns the
fallback to be executed asynchronously if execution fails. |
static <R> Fallback<R> |
Fallback.ofAsync(CheckedFunction<ExecutionAttemptedEvent<? extends R>,? extends R> fallback)
Returns the
fallback to be executed asynchronously 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. |
RetryPolicy<R> |
RetryPolicy.onFailedAttempt(CheckedConsumer<? extends ExecutionAttemptedEvent<R>> listener)
Registers the
listener to be called when an execution attempt fails. |
RetryPolicy<R> |
RetryPolicy.onRetry(CheckedConsumer<? extends ExecutionAttemptedEvent<R>> listener)
Registers the
listener to be called before an execution is retried. |
Copyright © 2019. All rights reserved.