Uses of Interface
dev.failsafe.Policy
-
Packages that use Policy Package Description dev.failsafe APIs for performing failsafe executions.dev.failsafe.internal dev.failsafe.spi The Failsafe Service Provider Interface (SPI). -
-
Uses of Policy in dev.failsafe
Subinterfaces of Policy in dev.failsafe Modifier and Type Interface 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 aTimeoutExceededException
if a timeout is exceeded.Fields in dev.failsafe with type parameters of type Policy Modifier and Type Field Description (package private) java.util.List<? extends Policy<R>>
FailsafeExecutor. policies
Policies sorted outermost firstMethods in dev.failsafe with type parameters of type Policy Modifier and Type Method Description <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 Policy Modifier and Type Method Description java.util.List<? extends Policy<R>>
FailsafeExecutor. getPolicies()
Returns the currently configured policies.Methods in dev.failsafe with parameters of type Policy Modifier and Type Method Description static <R> Execution<R>
Execution. of(Policy<R> outerPolicy, Policy<R>... policies)
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 Policy Modifier and Type Method Description static <R> FailsafeExecutor<R>
Failsafe. with(java.util.List<? extends Policy<R>> policies)
Creates and returns a newFailsafeExecutor
instance that will handle failures according to the givenpolicies
.Constructor parameters in dev.failsafe with type arguments of type Policy Constructor Description AsyncExecutionImpl(java.util.List<Policy<R>> policies, Scheduler scheduler, FailsafeFuture<R> future, boolean asyncExecution, java.util.function.Function<AsyncExecutionInternal<R>,java.util.concurrent.CompletableFuture<ExecutionResult<R>>> innerFn)
ExecutionImpl(java.util.List<? extends Policy<R>> policies)
Creates a new execution for thepolicies
.FailsafeExecutor(java.util.List<? extends Policy<R>> policies)
SyncExecutionImpl(java.util.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 Policy Modifier and Type Class Description class
BulkheadImpl<R>
A Bulkhead implementation that supports sync and async waiting.class
CircuitBreakerImpl<R>
ACircuitBreaker
implementation.class
FallbackImpl<R>
AFallback
implementation.class
RateLimiterImpl<R>
A RateLimiter implementation that supports smooth and bursty rate limiting.class
RetryPolicyImpl<R>
ARetryPolicy
implementation.class
TimeoutImpl<R>
ATimeout
implementation. -
Uses of Policy in dev.failsafe.spi
Subinterfaces of Policy in dev.failsafe.spi Modifier and Type Interface Description interface
DelayablePolicy<R>
A policy that can be delayed between executions.interface
FailurePolicy<R>
A policy that can handle specifically configured failures.Constructors in dev.failsafe.spi with parameters of type Policy Constructor Description PolicyExecutor(Policy<R> policy, int policyIndex)
-