Package | Description |
---|---|
dev.failsafe |
APIs for performing failsafe executions.
|
dev.failsafe.spi |
The Failsafe Service Provider Interface (SPI).
|
Modifier and Type | Interface and Description |
---|---|
interface |
Bulkhead<R>
A bulkhead allows you to restrict concurrent executions as a way of preventing system overload.
|
interface |
CircuitBreaker<R>
A circuit breaker temporarily blocks execution when a configured number of failures are exceeded.
|
interface |
Fallback<R>
A Policy that handles failures using a fallback function or result.
|
interface |
RateLimiter<R>
A rate limiter allows you to control the rate of executions as a way of preventing system overload.
|
interface |
RetryPolicy<R>
A policy that defines when retries should be performed.
|
interface |
Timeout<R>
A policy that cancels and fails an excecution with a
TimeoutExceededException if a
timeout is exceeded. |
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,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 . |
Modifier and Type | Method and Description |
---|---|
List<? extends Policy<R>> |
FailsafeExecutor.getPolicies()
Returns the currently configured policies.
|
Modifier and Type | Method and Description |
---|---|
static <R> Execution<R> |
Execution.of(Policy<R> outerPolicy,
Policy<R>... policies)
Creates a new
Execution that will use the outerPolicy and innerPolicies to handle
failures. |
static <R> Execution<R> |
Execution.of(Policy<R> outerPolicy,
Policy<R>... policies)
Creates a new
Execution that will use the outerPolicy and innerPolicies to handle
failures. |
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 . |
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 . |
Modifier and Type | Interface and Description |
---|---|
interface |
DelayablePolicy<R>
A policy that can be delayed between executions.
|
interface |
FailurePolicy<R>
A policy that can handle specifically configured failures.
|
Constructor and Description |
---|
PolicyExecutor(Policy<R> policy,
int policyIndex) |
Copyright © 2022. All rights reserved.