| Package | Description |
|---|---|
| net.jodah.failsafe |
Core Failsafe APIs for performing failsafe executions.
|
| Modifier and Type | Class and Description |
|---|---|
class |
PolicyExecutor<R,P extends Policy<R>>
Handles execution and execution results according to a policy.
|
| Modifier and Type | Class and Description |
|---|---|
class |
CircuitBreaker<R>
A circuit breaker temporarily blocks execution when a configured number of failures are exceeded.
|
class |
DelayablePolicy<S,R>
A policy that can be delayed between executions.
|
class |
FailurePolicy<S,R>
A Policy that captures conditions to determine whether an execution is a failure.
|
class |
Fallback<R>
A Policy that handles failures using a fallback function or result.
|
class |
RetryPolicy<R>
A policy that defines when retries should be performed.
|
class |
Timeout<R>
A policy that cancels and fails an excecution with a
TimeoutExceededException if a timeout is exceeded. |
| Modifier and Type | Field and Description |
|---|---|
protected P |
PolicyExecutor.policy |
| Modifier and Type | Method and Description |
|---|---|
static <R,P extends Policy<R>> |
Failsafe.with(P[] policies)
Deprecated.
Use
Failsafe.with(Policy, Policy[]) instead |
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
policies. |
| Modifier and Type | Method and Description |
|---|---|
PolicyExecutor<R,Policy<R>> |
Policy.toExecutor(AbstractExecution<R> execution)
Returns an
PolicyExecutor capable of performing an execution in the context of a Policy and handling
results according to the Policy. |
| Modifier and Type | Method and Description |
|---|---|
static <R,P extends Policy<R>> |
Failsafe.with(P[] policies)
Deprecated.
Use
Failsafe.with(Policy, Policy[]) instead |
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
policies. |
| Modifier and Type | Method and Description |
|---|---|
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. |
| Constructor and Description |
|---|
Execution(Policy<R>... policies)
Creates a new
Execution that will use the policies to handle failures. |
Copyright © 2021. All rights reserved.