| Package | Description |
|---|---|
| net.jodah.failsafe |
Core Failsafe APIs for performing failsafe executions.
|
| net.jodah.failsafe.event |
Event listener types.
|
| net.jodah.failsafe.function |
Functional interface types.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AsyncExecution
Tracks asynchronous executions and allows retries to be scheduled according to a
RetryPolicy. |
class |
Execution
Tracks executions and determines when an execution can be performed for a
RetryPolicy. |
| Modifier and Type | Method and Description |
|---|---|
Duration |
RetryPolicy.DelayFunction.computeDelay(R result,
F failure,
ExecutionContext context)
Returns the amount of delay before the next retry based on the result or failure of the last attempt and the
execution context (executions so far).
|
void |
Listeners.onAbort(R result,
Throwable failure,
ExecutionContext context)
Called when an execution is aborted.
|
void |
Listeners.onComplete(R result,
Throwable failure,
ExecutionContext context)
Called when an execution is completed.
|
void |
Listeners.onFailedAttempt(R result,
Throwable failure,
ExecutionContext context)
Called when an execution attempt fails.
|
void |
Listeners.onFailure(R result,
Throwable failure,
ExecutionContext context)
Called when an execution fails and cannot be retried.
|
void |
Listeners.onRetry(R result,
Throwable failure,
ExecutionContext context)
Called before an execution is retried.
|
void |
Listeners.onSuccess(R result,
ExecutionContext context)
Called when an execution is successful.
|
| Modifier and Type | Method and Description |
|---|---|
F |
FailsafeConfig.onSuccess(CheckedBiConsumer<? extends R,ExecutionContext> listener)
Registers the
listener to be called when an execution is successful. |
F |
AsyncFailsafeConfig.onSuccessAsync(CheckedBiConsumer<? extends R,ExecutionContext> listener)
Registers the
listener to be called asynchronously on Failsafe's configured executor or Scheduler after a
successful execution. |
F |
FailsafeConfig.onSuccessAsync(CheckedBiConsumer<? extends R,ExecutionContext> listener,
ExecutorService executor)
Registers the
listener to be called asynchronously on the executor when an execution is successful. |
| Modifier and Type | Method and Description |
|---|---|
void |
ContextualResultListener.onResult(R result,
F failure,
ExecutionContext context)
Handles an execution result.
|
| Modifier and Type | Method and Description |
|---|---|
T |
ContextualCallable.call(ExecutionContext context) |
void |
ContextualRunnable.run(ExecutionContext context) |
Copyright © 2018. All rights reserved.