Package | Description |
---|---|
dev.failsafe |
APIs for performing failsafe executions.
|
Modifier and Type | Method and Description |
---|---|
<P extends Policy<R>> |
FailsafeExecutor.compose(P innerPolicy)
Returns a new
FailsafeExecutor that composes the currently configured policies around the given innerPolicy . |
static <R> FailsafeExecutor<R> |
Failsafe.none()
Creates and returns a noop
FailsafeExecutor instance that treats any exception as a failure for the
purposes of calling event listeners, and provides no additional failure handling. |
FailsafeExecutor<R> |
FailsafeExecutor.onComplete(EventListener<ExecutionCompletedEvent<R>> listener)
Registers the
listener to be called when an execution is complete. |
FailsafeExecutor<R> |
FailsafeExecutor.onFailure(EventListener<ExecutionCompletedEvent<R>> listener)
Registers the
listener to be called when an execution fails. |
FailsafeExecutor<R> |
FailsafeExecutor.onSuccess(EventListener<ExecutionCompletedEvent<R>> listener)
Registers the
listener to be called when an execution is successful. |
FailsafeExecutor<R> |
FailsafeExecutor.with(Executor executor)
Configures the
executor to use as a wrapper around executions. |
FailsafeExecutor<R> |
FailsafeExecutor.with(ExecutorService executorService)
Configures the
executorService to use for performing asynchronous executions and listener callbacks. |
static <R> FailsafeExecutor<R> |
Failsafe.with(List<? extends Policy<R>> policies)
Creates and returns a new
FailsafeExecutor instance that will handle failures according to the given policies . |
static <R,P extends Policy<R>> |
Failsafe.with(P outerPolicy,
P... policies)
Creates and returns a new
FailsafeExecutor instance that will handle failures according to the given outerPolicy and policies . |
FailsafeExecutor<R> |
FailsafeExecutor.with(ScheduledExecutorService scheduledExecutorService)
Configures the
scheduledExecutorService to use for performing asynchronous executions and listener
callbacks. |
FailsafeExecutor<R> |
FailsafeExecutor.with(Scheduler scheduler)
Configures the
scheduler to use for performing asynchronous executions and listener callbacks. |
Copyright © 2022. All rights reserved.