Package | Description |
---|---|
net.jodah.failsafe |
Core Failsafe APIs for performing failsafe executions.
|
Modifier and Type | Method and Description |
---|---|
FailsafeExecutor<R> |
FailsafeExecutor.onComplete(CheckedConsumer<? extends ExecutionCompletedEvent<R>> listener)
Registers the
listener to be called when an execution is complete for all of the configured policies are
exceeded. |
FailsafeExecutor<R> |
FailsafeExecutor.onFailure(CheckedConsumer<? extends ExecutionCompletedEvent<R>> listener)
Registers the
listener to be called when an execution fails. |
FailsafeExecutor<R> |
FailsafeExecutor.onSuccess(CheckedConsumer<? extends ExecutionCompletedEvent<R>> listener)
Registers the
listener to be called when an execution is successful. |
FailsafeExecutor<R> |
FailsafeExecutor.with(ExecutorService executor)
Configures the
executor 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... policies)
Creates and returns a new
FailsafeExecutor instance that will handle failures according to the given policies . |
FailsafeExecutor<R> |
FailsafeExecutor.with(ScheduledExecutorService executor)
Configures the
executor 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 © 2020. All rights reserved.