Package | Description |
---|---|
dev.failsafe |
APIs for performing failsafe executions.
|
dev.failsafe.event |
Event listener types.
|
dev.failsafe.function |
Functional interface types.
|
dev.failsafe.spi |
The Failsafe Service Provider Interface (SPI).
|
Modifier and Type | Interface and Description |
---|---|
interface |
AsyncExecution<R>
Allows asynchronous executions to record their results or complete an execution.
|
interface |
Execution<R>
Tracks synchronous executions and handles failures according to one or more
policies . |
Constructor and Description |
---|
ExecutionAttemptedEvent(R result,
Throwable exception,
ExecutionContext<R> context) |
ExecutionCompletedEvent(R result,
Throwable exception,
ExecutionContext<R> context) |
ExecutionScheduledEvent(R result,
Throwable exception,
Duration delay,
ExecutionContext<R> context) |
Modifier and Type | Method and Description |
---|---|
T |
ContextualSupplier.get(ExecutionContext<R> context) |
void |
ContextualRunnable.run(ExecutionContext<R> context) |
Modifier and Type | Interface and Description |
---|---|
interface |
AsyncExecutionInternal<R>
Internal async execution APIs.
|
interface |
ExecutionInternal<R>
Internal execution APIs.
|
interface |
SyncExecutionInternal<R>
Internal execution APIs.
|
Modifier and Type | Method and Description |
---|---|
default Duration |
DelayablePolicy.computeDelay(ExecutionContext<R> context)
Returns a computed delay for the
result and context else null if no delay function is
configured or the computed delay is invalid. |
protected ExecutionResult<R> |
PolicyExecutor.onFailure(ExecutionContext<R> context,
ExecutionResult<R> result)
Performs post-execution handling for a
result that is considered a failure according to PolicyExecutor.isFailure(ExecutionResult) , possibly creating a new result, else returning the original result . |
protected CompletableFuture<ExecutionResult<R>> |
PolicyExecutor.onFailureAsync(ExecutionContext<R> context,
ExecutionResult<R> result,
Scheduler scheduler,
FailsafeFuture<R> future)
Performs potentially asynchrononus post-execution handling for a failed
result , possibly creating a new
result, else returning the original result . |
Constructor and Description |
---|
FailsafeFuture(BiConsumer<ExecutionResult<R>,ExecutionContext<R>> completionHandler) |
Copyright © 2022. All rights reserved.