Uses of Interface
dev.failsafe.Policy
Packages that use Policy
Package
Description
APIs for performing failsafe executions.
The Failsafe Service Provider Interface (SPI).
-
Uses of Policy in dev.failsafe
Subinterfaces of Policy in dev.failsafeModifier and TypeInterfaceDescriptioninterface
Bulkhead<R>
A bulkhead allows you to restrict concurrent executions as a way of preventing system overload.interface
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 aTimeoutExceededException
if a timeout is exceeded.Fields in dev.failsafe with type parameters of type PolicyMethods in dev.failsafe with type parameters of type PolicyModifier and TypeMethodDescription<P extends Policy<R>>
FailsafeExecutor<R> FailsafeExecutor.compose
(P innerPolicy) Returns a newFailsafeExecutor
that composes the currently configured policies around the giveninnerPolicy
.static <R,
P extends Policy<R>>
FailsafeExecutor<R> Failsafe.with
(P outerPolicy, P... policies) Creates and returns a newFailsafeExecutor
instance that will handle failures according to the givenouterPolicy
andpolicies
.Methods in dev.failsafe that return types with arguments of type PolicyModifier and TypeMethodDescriptionFailsafeExecutor.getPolicies()
Returns the currently configured policies.Methods in dev.failsafe with parameters of type PolicyModifier and TypeMethodDescriptionstatic <R> Execution
<R> Creates a newExecution
that will use theouterPolicy
andinnerPolicies
to handle failures.static <R,
P extends Policy<R>>
FailsafeExecutor<R> Failsafe.with
(P outerPolicy, P... policies) Creates and returns a newFailsafeExecutor
instance that will handle failures according to the givenouterPolicy
andpolicies
.Method parameters in dev.failsafe with type arguments of type PolicyModifier and TypeMethodDescriptionstatic <R> FailsafeExecutor
<R> Creates and returns a newFailsafeExecutor
instance that will handle failures according to the givenpolicies
.Constructor parameters in dev.failsafe with type arguments of type PolicyModifierConstructorDescription(package private)
AsyncExecutionImpl
(List<Policy<R>> policies, Scheduler scheduler, FailsafeFuture<R> future, boolean asyncExecution, Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn) (package private)
ExecutionImpl
(List<? extends Policy<R>> policies) Creates a new execution for thepolicies
.(package private)
FailsafeExecutor
(List<? extends Policy<R>> policies) (package private)
SyncExecutionImpl
(List<? extends Policy<R>> policies) Create a standalone sync execution for thepolicies
. -
Uses of Policy in dev.failsafe.internal
Classes in dev.failsafe.internal that implement PolicyModifier and TypeClassDescriptionclass
BulkheadImpl<R>
A Bulkhead implementation that supports sync and async waiting.class
ACircuitBreaker
implementation.class
FallbackImpl<R>
AFallback
implementation.class
A RateLimiter implementation that supports smooth and bursty rate limiting.class
ARetryPolicy
implementation.class
TimeoutImpl<R>
ATimeout
implementation. -
Uses of Policy in dev.failsafe.spi
Subinterfaces of Policy in dev.failsafe.spiModifier and TypeInterfaceDescriptioninterface
A policy that can be delayed between executions.interface
A policy that can handle specifically configured failures.Constructors in dev.failsafe.spi with parameters of type Policy