Skip navigation links
A B C D E F G H I N O P R S T V W 

A

abortIf(CheckedBiPredicate<R, ? extends Throwable>) - Method in class dev.failsafe.RetryPolicyBuilder
Specifies that retries should be aborted if the completionPredicate matches the completion result.
abortIf(CheckedPredicate<R>) - Method in class dev.failsafe.RetryPolicyBuilder
Specifies that retries should be aborted if the resultPredicate matches the result.
abortOn(Class<? extends Throwable>) - Method in class dev.failsafe.RetryPolicyBuilder
Specifies when retries should be aborted.
abortOn(Class<? extends Throwable>...) - Method in class dev.failsafe.RetryPolicyBuilder
Specifies when retries should be aborted.
abortOn(List<Class<? extends Throwable>>) - Method in class dev.failsafe.RetryPolicyBuilder
Specifies when retries should be aborted.
abortOn(CheckedPredicate<? extends Throwable>) - Method in class dev.failsafe.RetryPolicyBuilder
Specifies that retries should be aborted if the abortPredicate matches the exception.
abortWhen(R) - Method in class dev.failsafe.RetryPolicyBuilder
Specifies that retries should be aborted if the execution result matches the result.
accept(E) - Method in interface dev.failsafe.event.EventListener
 
accept(T) - Method in interface dev.failsafe.function.CheckedConsumer
 
acceptUnchecked(E) - Method in interface dev.failsafe.event.EventListener
Accepts an event and ignores any exceptions that result.
acquirePermit() - Method in interface dev.failsafe.Bulkhead
Attempts to acquire a permit to perform an execution against within the bulkhead, waiting until one is available or the thread is interrupted.
acquirePermit(Duration) - Method in interface dev.failsafe.Bulkhead
Attempts to acquire a permit to perform an execution within the bulkhead, waiting up to the maxWaitTime until one is available, else throwing BulkheadFullException if a permit will not be available in time.
acquirePermit() - Method in interface dev.failsafe.CircuitBreaker
Attempts to acquire a permit for the circuit breaker and throws CircuitBreakerOpenException if a permit could not be acquired.
acquirePermit() - Method in interface dev.failsafe.RateLimiter
Attempts to acquire a permit to perform an execution against the rate limiter, waiting until one is available or the thread is interrupted.
acquirePermit(Duration) - Method in interface dev.failsafe.RateLimiter
Attempts to acquire a permit to perform an execution against the rate limiter, waiting up to the maxWaitTime until one is available, else throwing RateLimitExceededException if a permit will not be available in time.
acquirePermits(int) - Method in interface dev.failsafe.RateLimiter
Attempts to acquire the requested permits to perform executions against the rate limiter, waiting until they are available or the thread is interrupted.
acquirePermits(int, Duration) - Method in interface dev.failsafe.RateLimiter
Attempts to acquire the requested permits to perform executions against the rate limiter, waiting up to the maxWaitTime until they are available, else throwing RateLimitExceededException if the permits will not be available in time.
allowsRetries() - Method in class dev.failsafe.RetryPolicyConfig
Returns whether the policy config allows retries according to the configured maxRetries and maxDuration.
apply(T) - Method in interface dev.failsafe.function.CheckedFunction
 
apply(Function<SyncExecutionInternal<R>, ExecutionResult<R>>, Scheduler) - Method in class dev.failsafe.spi.PolicyExecutor
Performs an execution by calling pre-execute else calling the supplier and doing a post-execute.
applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>>, Scheduler, FailsafeFuture<R>) - Method in class dev.failsafe.spi.PolicyExecutor
Performs an async execution by calling pre-execute else calling the supplier and doing a post-execute.
AsyncExecution<R> - Interface in dev.failsafe
Allows asynchronous executions to record their results or complete an execution.
AsyncExecutionInternal<R> - Interface in dev.failsafe.spi
Internal async execution APIs.
AsyncRunnable<R> - Interface in dev.failsafe.function
A Runnable that manually triggers asynchronous retries or completion via an asynchronous execution.
AsyncSupplier<R,T> - Interface in dev.failsafe.function
A Supplier that manually triggers asynchronous retries or completion via an asynchronous execution.

B

build() - Method in class dev.failsafe.BulkheadBuilder
Builds a new Bulkhead using the builder's configuration.
build() - Method in class dev.failsafe.CircuitBreakerBuilder
Builds a new CircuitBreaker using the builder's configuration.
build() - Method in class dev.failsafe.FallbackBuilder
Builds a new Fallback using the builder's configuration.
build() - Method in class dev.failsafe.RateLimiterBuilder
Builds a new RateLimiter using the builder's configuration.
build() - Method in class dev.failsafe.RetryPolicyBuilder
Builds a new RetryPolicy using the builder's configuration.
build() - Method in class dev.failsafe.TimeoutBuilder
Builds a new Timeout using the builder's configuration.
builder(int) - Static method in interface dev.failsafe.Bulkhead
Returns a Bulkhead for the maxConcurrency that has zero wait.
builder(BulkheadConfig<R>) - Static method in interface dev.failsafe.Bulkhead
Creates a new BulkheadBuilder that will be based on the config.
builder() - Static method in interface dev.failsafe.CircuitBreaker
Creates a CircuitBreakerBuilder that by default will build a count based circuit breaker that opens after a single failure, closes after a single success, and has a 1 minute delay, unless configured otherwise.
builder(CircuitBreakerConfig<R>) - Static method in interface dev.failsafe.CircuitBreaker
Creates a new CircuitBreakerBuilder that will be based on the config.
builder(FallbackConfig<R>) - Static method in interface dev.failsafe.Fallback
Creates a new FallbackBuilder that will be based on the config.
builder(CheckedRunnable) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
builder(CheckedSupplier<? extends R>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
builder(CheckedConsumer<ExecutionAttemptedEvent<? extends R>>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
builder(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends R>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
builder(R) - Static method in interface dev.failsafe.Fallback
Returns the fallbackResult to be provided if execution fails.
builder(RateLimiterConfig<R>) - Static method in interface dev.failsafe.RateLimiter
Creates a new RateLimiterBuilder that will be based on the config.
builder() - Static method in interface dev.failsafe.RetryPolicy
Creates a RetryPolicyBuilder that by default will build a RetryPolicy that allows 3 execution attempts max with no delay, unless configured otherwise.
builder(RetryPolicyConfig<R>) - Static method in interface dev.failsafe.RetryPolicy
Creates a new RetryPolicyBuilder that will be based on the config.
builder(Duration) - Static method in interface dev.failsafe.Timeout
Returns a TimeoutBuilder that builds Timeout instances with the given timeout.
builder(TimeoutConfig<R>) - Static method in interface dev.failsafe.Timeout
Creates a new TimeoutBuilder that will be based on the config.
builderOfException(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends Exception>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails and allows an alternative exception to be supplied instead.
builderOfStage(CheckedSupplier<? extends CompletionStage<R>>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
builderOfStage(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends CompletionStage<R>>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
Bulkhead<R> - Interface in dev.failsafe
A bulkhead allows you to restrict concurrent executions as a way of preventing system overload.
BulkheadBuilder<R> - Class in dev.failsafe
Builds Bulkhead instances.
BulkheadConfig<R> - Class in dev.failsafe
Configuration for a Bulkhead.
BulkheadFullException - Exception in dev.failsafe
Thrown when an execution is attempted against a Bulkhead that is full.
BulkheadFullException(Bulkhead<?>) - Constructor for exception dev.failsafe.BulkheadFullException
 
burstyBuilder(long, Duration) - Static method in interface dev.failsafe.RateLimiter
Returns a bursty RateLimiterBuilder for the maxExecutions per period.

C

Call<R> - Interface in dev.failsafe
A call that can perform Failsafe executions and can be cancelled.
cancel(boolean) - Method in interface dev.failsafe.Call
Cancels a synchronous execution and calls the most recent cancelCallback that was registered.
cancel(boolean) - Method in class dev.failsafe.spi.DefaultScheduledFuture
 
cancel() - Method in interface dev.failsafe.spi.ExecutionInternal
Marks the execution as having been cancelled externally, which will cancel pending executions of all policies.
cancel(PolicyExecutor<R>) - Method in interface dev.failsafe.spi.ExecutionInternal
Marks the execution as having been cancelled by the policyExecutor, which will also cancel pending executions of any inner policies of the policyExecutor.
cancel(boolean) - Method in class dev.failsafe.spi.FailsafeFuture
Cancels the future along with any dependencies.
cancelDependencies(PolicyExecutor<R>, boolean, ExecutionResult<R>) - Method in class dev.failsafe.spi.FailsafeFuture
Applies any cancel functions with the cancelResult for PolicyExecutors whose policyIndex is < the policyIndex of the cancellingPolicyExecutor.
canInterrupt() - Method in class dev.failsafe.TimeoutConfig
Returns whether the policy can interrupt an execution if the timeout is exceeded.
CheckedBiPredicate<T,U> - Interface in dev.failsafe.function
A BiPredicate that throws checked exceptions.
CheckedConsumer<T> - Interface in dev.failsafe.function
A Consumer that throws checked exceptions.
CheckedFunction<T,R> - Interface in dev.failsafe.function
A Function that throws checked exceptions.
CheckedPredicate<T> - Interface in dev.failsafe.function
A Predicate that throws checked exceptions.
CheckedRunnable - Interface in dev.failsafe.function
A Runnable that throws checked exceptions.
CheckedSupplier<T> - Interface in dev.failsafe.function
A Supplier that throws checked exceptions.
CircuitBreaker<R> - Interface in dev.failsafe
A circuit breaker temporarily blocks execution when a configured number of failures are exceeded.
CircuitBreaker.State - Enum in dev.failsafe
The state of the circuit.
CircuitBreakerBuilder<R> - Class in dev.failsafe
Builds CircuitBreaker instances.
CircuitBreakerConfig<R> - Class in dev.failsafe
Configuration for a CircuitBreaker.
CircuitBreakerOpenException - Exception in dev.failsafe
Thrown when an execution is attempted against a CircuitBreaker that is open.
CircuitBreakerOpenException(CircuitBreaker<?>) - Constructor for exception dev.failsafe.CircuitBreakerOpenException
 
CircuitBreakerStateChangedEvent - Class in dev.failsafe.event
Indicates a circuit breaker's state changed.
CircuitBreakerStateChangedEvent(CircuitBreaker.State) - Constructor for class dev.failsafe.event.CircuitBreakerStateChangedEvent
 
close() - Method in interface dev.failsafe.CircuitBreaker
Closes the circuit.
compareTo(Delayed) - Method in class dev.failsafe.spi.DefaultScheduledFuture
 
complete() - Method in interface dev.failsafe.AsyncExecution
Completes the execution and the associated CompletableFuture.
complete() - Method in interface dev.failsafe.Execution
Records and completes the execution successfully.
complete(R) - Method in class dev.failsafe.spi.FailsafeFuture
If not already completed, completes the future with the value, calling the complete and success handlers.
completeExceptionally(Throwable) - Method in class dev.failsafe.spi.FailsafeFuture
If not already completed, completes the future with the exception, calling the complete and failure handlers.
completeResult(ExecutionResult<R>) - Method in class dev.failsafe.spi.FailsafeFuture
Completes the execution with the result and calls the completion handler.
compose(P) - Method in class dev.failsafe.FailsafeExecutor
Returns a new FailsafeExecutor that composes the currently configured policies around the given innerPolicy.
computeDelay(ExecutionContext<R>) - Method in interface dev.failsafe.spi.DelayablePolicy
Returns a computed delay for the result and context else null if no delay function is configured or the computed delay is invalid.
config - Variable in class dev.failsafe.PolicyBuilder
 
ContextualRunnable<R> - Interface in dev.failsafe.function
A Runnable that provides execution context.
ContextualSupplier<R,T> - Interface in dev.failsafe.function
A Supplier that provides execution context.
copy() - Method in interface dev.failsafe.spi.AsyncExecutionInternal
Returns a new copy of the AsyncExecutionInternal.
copy() - Method in interface dev.failsafe.spi.SyncExecutionInternal
Returns a new copy of the SyncExecutionInternal if it is not standalone, else returns this since standalone executions are referenced externally and cannot be replaced.

D

DEFAULT - Static variable in interface dev.failsafe.spi.Scheduler
The default scheduler used by Failsafe if no other scheduler or ScheduledExecutorService is configured for an execution.
DefaultScheduledFuture<R> - Class in dev.failsafe.spi
A default ScheduledFuture implementation.
DefaultScheduledFuture() - Constructor for class dev.failsafe.spi.DefaultScheduledFuture
 
DelayablePolicy<R> - Interface in dev.failsafe.spi
A policy that can be delayed between executions.
DelayablePolicyBuilder<S,C extends DelayablePolicyConfig<R>,R> - Class in dev.failsafe
A builder of policies that can be delayed between executions.
DelayablePolicyBuilder(C) - Constructor for class dev.failsafe.DelayablePolicyBuilder
 
DelayablePolicyConfig<R> - Class in dev.failsafe
Configuration for policies that can delay between executions.
DelayablePolicyConfig() - Constructor for class dev.failsafe.DelayablePolicyConfig
 
DelayablePolicyConfig(DelayablePolicyConfig<R>) - Constructor for class dev.failsafe.DelayablePolicyConfig
 
dev.failsafe - package dev.failsafe
APIs for performing failsafe executions.
dev.failsafe.event - package dev.failsafe.event
Event listener types.
dev.failsafe.function - package dev.failsafe.function
Functional interface types.
dev.failsafe.spi - package dev.failsafe.spi
The Failsafe Service Provider Interface (SPI).

E

equals(Object) - Method in class dev.failsafe.spi.ExecutionResult
 
EventListener<E> - Interface in dev.failsafe.event
Listens for events.
exception(Throwable) - Static method in class dev.failsafe.spi.ExecutionResult
Returns an ExecutionResult with the exception set, complete true and success false.
execute() - Method in interface dev.failsafe.Call
Executes the call until a successful result is returned or the configured policies are exceeded.
Execution<R> - Interface in dev.failsafe
Tracks synchronous executions and handles failures according to one or more policies.
ExecutionAttemptedEvent<R> - Class in dev.failsafe.event
Indicates an execution was attempted.
ExecutionAttemptedEvent(R, Throwable, ExecutionContext<R>) - Constructor for class dev.failsafe.event.ExecutionAttemptedEvent
 
ExecutionCompletedEvent<R> - Class in dev.failsafe.event
Indicates an execution was completed or cancelled.
ExecutionCompletedEvent(R, Throwable, ExecutionContext<R>) - Constructor for class dev.failsafe.event.ExecutionCompletedEvent
 
ExecutionContext<R> - Interface in dev.failsafe
Contextual execution information.
ExecutionEvent - Class in dev.failsafe.event
Encapsulates information about a Failsafe execution.
ExecutionInternal<R> - Interface in dev.failsafe.spi
Internal execution APIs.
ExecutionResult<R> - Class in dev.failsafe.spi
This class represents the internal result of an execution attempt for zero or more policies, before or after the policy has handled the result.
ExecutionResult(R, Throwable) - Constructor for class dev.failsafe.spi.ExecutionResult
Records an initial execution result with complete true and success set to true if exception is not null.
ExecutionScheduledEvent<R> - Class in dev.failsafe.event
Indicates an execution was scheduled.
ExecutionScheduledEvent(R, Throwable, Duration, ExecutionContext<R>) - Constructor for class dev.failsafe.event.ExecutionScheduledEvent
 

F

Failsafe - Class in dev.failsafe
Simple, sophisticated failure handling.
Failsafe() - Constructor for class dev.failsafe.Failsafe
 
FailsafeException - Exception in dev.failsafe
Thrown when a synchronous Failsafe execution fails with an Exception, wrapping the underlying exception.
FailsafeException() - Constructor for exception dev.failsafe.FailsafeException
 
FailsafeException(Throwable) - Constructor for exception dev.failsafe.FailsafeException
 
FailsafeExecutor<R> - Class in dev.failsafe
An executor that handles failures according to configured policies.
FailsafeFuture<R> - Class in dev.failsafe.spi
A CompletableFuture implementation that propagates cancellations and calls completion handlers.
FailsafeFuture(BiConsumer<ExecutionResult<R>, ExecutionContext<R>>) - Constructor for class dev.failsafe.spi.FailsafeFuture
 
FailurePolicy<R> - Interface in dev.failsafe.spi
A policy that can handle specifically configured failures.
FailurePolicyBuilder<S,C extends FailurePolicyConfig<R>,R> - Class in dev.failsafe
A Policy that allows configurable conditions to determine whether an execution is a failure.
FailurePolicyBuilder(C) - Constructor for class dev.failsafe.FailurePolicyBuilder
 
FailurePolicyConfig<R> - Class in dev.failsafe
Configuration for policies that handle specific failures and conditions.
FailurePolicyConfig() - Constructor for class dev.failsafe.FailurePolicyConfig
 
FailurePolicyConfig(FailurePolicyConfig<R>) - Constructor for class dev.failsafe.FailurePolicyConfig
 
Fallback<R> - Interface in dev.failsafe
A Policy that handles failures using a fallback function or result.
FallbackBuilder<R> - Class in dev.failsafe
Builds Fallback instances.
FallbackConfig<R> - Class in dev.failsafe
Configuration for a Fallback.

G

get(CheckedSupplier<T>) - Method in class dev.failsafe.FailsafeExecutor
Executes the supplier until a successful result is returned or the configured policies are exceeded.
get(ContextualSupplier<T, T>) - Method in class dev.failsafe.FailsafeExecutor
Executes the supplier until a successful result is returned or the configured policies are exceeded.
get(AsyncExecution<R>) - Method in interface dev.failsafe.function.AsyncSupplier
 
get() - Method in interface dev.failsafe.function.CheckedSupplier
 
get(ExecutionContext<R>) - Method in interface dev.failsafe.function.ContextualSupplier
 
get() - Method in class dev.failsafe.spi.DefaultScheduledFuture
 
get(long, TimeUnit) - Method in class dev.failsafe.spi.DefaultScheduledFuture
 
getAbortConditions() - Method in class dev.failsafe.RetryPolicyConfig
Returns the conditions for which an execution result or exception will cause retries to be aborted.
getAbortListener() - Method in class dev.failsafe.RetryPolicyConfig
Returns the abort event listener.
getAsync(CheckedSupplier<T>) - Method in class dev.failsafe.FailsafeExecutor
Executes the supplier asynchronously until a successful result is returned or the configured policies are exceeded.
getAsync(ContextualSupplier<T, T>) - Method in class dev.failsafe.FailsafeExecutor
Executes the supplier asynchronously until a successful result is returned or the configured policies are exceeded.
getAsyncExecution(AsyncRunnable<T>) - Method in class dev.failsafe.FailsafeExecutor
This method is intended for integration with asynchronous code.
getAttemptCount() - Method in class dev.failsafe.event.ExecutionEvent
Gets the number of execution attempts so far, including attempts that are blocked before being executed, such as when a CircuitBreaker is open.
getAttemptCount() - Method in interface dev.failsafe.ExecutionContext
Gets the number of execution attempts so far, including attempts that are blocked before being executed, such as when a CircuitBreaker is open.
getBulkhead() - Method in exception dev.failsafe.BulkheadFullException
Returns the Bulkhead that caused the exception.
getCircuitBreaker() - Method in exception dev.failsafe.CircuitBreakerOpenException
Returns the CircuitBreaker that caused the exception.
getCloseListener() - Method in class dev.failsafe.CircuitBreakerConfig
Returns the close event listener.
getConfig() - Method in interface dev.failsafe.Bulkhead
Returns the BulkheadConfig that the Bulkhead was built with.
getConfig() - Method in interface dev.failsafe.CircuitBreaker
Returns the CircuitBreakerConfig that the CircuitBreaker was built with.
getConfig() - Method in interface dev.failsafe.Fallback
Returns the FallbackConfig that the Fallback was built with.
getConfig() - Method in interface dev.failsafe.Policy
Returns the policy config.
getConfig() - Method in interface dev.failsafe.RateLimiter
Returns the RateLimiterConfig that the RateLimiter was built with.
getConfig() - Method in interface dev.failsafe.RetryPolicy
Returns the RetryPolicyConfig that the RetryPolicy was built with.
getConfig() - Method in interface dev.failsafe.spi.DelayablePolicy
 
getConfig() - Method in interface dev.failsafe.spi.FailurePolicy
 
getConfig() - Method in interface dev.failsafe.Timeout
Returns the TimeoutConfig that the Timeout was built with.
getDelay() - Method in class dev.failsafe.CircuitBreakerConfig
Returns the delay before allowing another execution on the circuit.
getDelay() - Method in class dev.failsafe.DelayablePolicyConfig
Returns the delay until the next execution attempt can be performed.
getDelay() - Method in class dev.failsafe.event.ExecutionScheduledEvent
Returns the delay before the next execution attempt.
getDelay() - Method in interface dev.failsafe.Execution
Returns the time to delay before the next execution attempt.
getDelay() - Method in class dev.failsafe.RetryPolicyConfig
Returns the delay between retries, else Duration.ZERO if delays have not been configured.
getDelay(TimeUnit) - Method in class dev.failsafe.spi.DefaultScheduledFuture
 
getDelay() - Method in class dev.failsafe.spi.ExecutionResult
 
getDelayException() - Method in class dev.failsafe.DelayablePolicyConfig
Returns the Throwable that must be matched in order to delay using the DelayablePolicyConfig.getDelayFn().
getDelayFactor() - Method in class dev.failsafe.RetryPolicyConfig
Returns the delay factor for backoff retries.
getDelayFn() - Method in class dev.failsafe.DelayablePolicyConfig
Returns the function that determines the next delay before another execution can be performed.
getDelayMax() - Method in class dev.failsafe.RetryPolicyConfig
Returns the max random delay between retries, else null if random delays have not been configured.
getDelayMin() - Method in class dev.failsafe.RetryPolicyConfig
Returns the min random delay between retries, else null if random delays have not been configured.
getDelayResult() - Method in class dev.failsafe.DelayablePolicyConfig
Returns the result that must be matched in order to delay using the DelayablePolicyConfig.getDelayFn().
getElapsedAttemptTime() - Method in class dev.failsafe.event.ExecutionEvent
Returns the elapsed time since the last execution attempt began.
getElapsedAttemptTime() - Method in interface dev.failsafe.ExecutionContext
Returns the elapsed time since the last execution attempt began.
getElapsedTime() - Method in class dev.failsafe.event.ExecutionEvent
Returns the elapsed time since initial execution began.
getElapsedTime() - Method in interface dev.failsafe.ExecutionContext
Returns the elapsed time since initial execution began.
getException() - Method in class dev.failsafe.event.ExecutionCompletedEvent
Returns the failure that preceded the event, else null if there was none.
getException() - Method in class dev.failsafe.spi.ExecutionResult
 
getExecutionCount() - Method in interface dev.failsafe.CircuitBreaker
Returns the number of executions recorded in the current state when the state is CLOSED or HALF_OPEN.
getExecutionCount() - Method in class dev.failsafe.event.ExecutionEvent
Gets the number of completed executions so far.
getExecutionCount() - Method in interface dev.failsafe.ExecutionContext
Gets the number of completed executions so far.
getFailedAttemptListener() - Method in class dev.failsafe.FallbackConfig
Returns the failed attempt event listener.
getFailedAttemptListener() - Method in class dev.failsafe.RetryPolicyConfig
Returns the failed attempt event listener.
getFailureConditions() - Method in class dev.failsafe.FailurePolicyConfig
Returns the conditions under which a result or Throwable should be treated as a failure and handled.
getFailureCount() - Method in interface dev.failsafe.CircuitBreaker
Returns the number of failures recorded in the current state when the state is CLOSED or HALF_OPEN.
getFailureExecutionThreshold() - Method in class dev.failsafe.CircuitBreakerConfig
Used with time based thresholding.
getFailureListener() - Method in class dev.failsafe.PolicyConfig
Returns the failure listener.
getFailureRate() - Method in interface dev.failsafe.CircuitBreaker
The percentage rate of failed executions, from 0 to 100, in the current state when the state is CLOSED or HALF_OPEN.
getFailureRateThreshold() - Method in class dev.failsafe.CircuitBreakerConfig
Used with time based thresholding.
getFailureThreshold() - Method in class dev.failsafe.CircuitBreakerConfig
Gets the number of failures that must occur within the failure thresholding capacity when in a CLOSED or HALF_OPEN state in order to open the circuit.
getFailureThresholdingCapacity() - Method in class dev.failsafe.CircuitBreakerConfig
Returns the rolling capacity for storing execution results when performing failure thresholding in the CLOSED or HALF_OPEN states.
getFailureThresholdingPeriod() - Method in class dev.failsafe.CircuitBreakerConfig
Used with time based thresholding.
getFallback() - Method in class dev.failsafe.FallbackConfig
Returns the fallback function, else null if a fallback stage function was configured instead.
getFallbackStage() - Method in class dev.failsafe.FallbackConfig
Returns the fallback stage function, else null if a fallback function was configured instead.
getHalfOpenListener() - Method in class dev.failsafe.CircuitBreakerConfig
Returns the half-open event listener.
getJitter() - Method in class dev.failsafe.RetryPolicyConfig
Returns the jitter, else null if none has been configured.
getJitterFactor() - Method in class dev.failsafe.RetryPolicyConfig
Returns the jitter factor, else 0.0 if none has been configured.
getLastException() - Method in class dev.failsafe.event.ExecutionAttemptedEvent
Returns the failure that preceded the event, else null if there was none.
getLastException() - Method in class dev.failsafe.event.ExecutionScheduledEvent
Returns the failure that preceded the event, else null if there was none.
getLastException() - Method in interface dev.failsafe.ExecutionContext
Returns the last exception that was recorded else null.
getLastResult() - Method in class dev.failsafe.event.ExecutionAttemptedEvent
Returns the result that preceded the event, else null if there was none.
getLastResult() - Method in class dev.failsafe.event.ExecutionScheduledEvent
Returns the result that preceded the event, else null if there was none.
getLastResult() - Method in interface dev.failsafe.ExecutionContext
Returns the last result that was recorded else null.
getLastResult(R) - Method in interface dev.failsafe.ExecutionContext
Returns the last result that was recorded else the defaultValue.
getLatest() - Method in interface dev.failsafe.spi.ExecutionInternal
Returns the most recent execution to be attempted.
getLock() - Method in interface dev.failsafe.spi.ExecutionInternal
Returns a lock object that is common across all execution attempts.
getMaxAttempts() - Method in class dev.failsafe.RetryPolicyConfig
Returns the max number of execution attempts to perform.
getMaxConcurrency() - Method in class dev.failsafe.BulkheadConfig
Returns that max concurrent executions that are permitted within the bulkhead.
getMaxDelay() - Method in class dev.failsafe.RetryPolicyConfig
Returns the max delay between backoff retries, else null if backoff delays have not been configured.
getMaxDuration() - Method in class dev.failsafe.RetryPolicyConfig
Returns the max duration to perform retries for.
getMaxPermits() - Method in class dev.failsafe.RateLimiterConfig
For bursty rate limiters, returns the max permitted executions per period, else null if the rate limiter is not bursty.
getMaxRate() - Method in class dev.failsafe.RateLimiterConfig
For smooth rate limiters, returns the max rate at which individual executions are permitted, else null if the rate limiter is not smooth.
getMaxRetries() - Method in class dev.failsafe.RetryPolicyConfig
Returns the max number of retries to perform when an execution attempt fails.
getMaxWaitTime() - Method in class dev.failsafe.BulkheadConfig
Returns the max time to wait for permits to be available.
getMaxWaitTime() - Method in class dev.failsafe.RateLimiterConfig
Returns the max time to wait for permits to be available.
getOpenListener() - Method in class dev.failsafe.CircuitBreakerConfig
Returns the open event listener.
getPeriod() - Method in class dev.failsafe.RateLimiterConfig
For bursty rate limiters, returns the period after which permits are reset to maxPermits, else null if the rate limiter is not bursty.
getPolicies() - Method in class dev.failsafe.FailsafeExecutor
Returns the currently configured policies.
getPolicyIndex() - Method in class dev.failsafe.spi.PolicyExecutor
Returns the index of the policy relative to other policies in a composition, where the innermost policy in a composition has an index of 0.
getPreviousState() - Method in class dev.failsafe.event.CircuitBreakerStateChangedEvent
Returns the previous state of the circuit breaker.
getRateLimiter() - Method in exception dev.failsafe.RateLimitExceededException
Returns the RateLimiter that caused the exception.
getRemainingDelay() - Method in interface dev.failsafe.CircuitBreaker
When in the OPEN state, returns the remaining delay until the circuit is half-opened and allows another execution, else returns Duration.ZERO.
getResult() - Method in class dev.failsafe.event.ExecutionCompletedEvent
Returns the result that preceded the event, else null if there was none.
getResult() - Method in interface dev.failsafe.spi.ExecutionInternal
Returns the recorded result for an execution attempt.
getResult() - Method in class dev.failsafe.spi.ExecutionResult
 
getRetriesExceededListener() - Method in class dev.failsafe.RetryPolicyConfig
Returns the retries exceeded event listener.
getRetryListener() - Method in class dev.failsafe.RetryPolicyConfig
Returns the retry event listener.
getRetryScheduledListener() - Method in class dev.failsafe.RetryPolicyConfig
Returns the retry scheduled event listener.
getStageAsync(CheckedSupplier<? extends CompletionStage<T>>) - Method in class dev.failsafe.FailsafeExecutor
Executes the supplier asynchronously until the resulting future is successfully completed or the configured policies are exceeded.
getStageAsync(ContextualSupplier<T, ? extends CompletionStage<T>>) - Method in class dev.failsafe.FailsafeExecutor
Executes the supplier asynchronously until the resulting future is successfully completed or the configured policies are exceeded.
getStartTime() - Method in class dev.failsafe.event.ExecutionEvent
Returns the time that the initial execution started, else Optional.empty() if an execution has not started yet.
getStartTime() - Method in interface dev.failsafe.ExecutionContext
Returns the time that the initial execution started.
getState() - Method in interface dev.failsafe.CircuitBreaker
Gets the state of the circuit.
getSuccessAll() - Method in class dev.failsafe.spi.ExecutionResult
Returns whether the execution was successful for all policies.
getSuccessCount() - Method in interface dev.failsafe.CircuitBreaker
Returns the number of successes recorded in the current state when the state is CLOSED or HALF_OPEN.
getSuccessListener() - Method in class dev.failsafe.PolicyConfig
Returns the success listener.
getSuccessRate() - Method in interface dev.failsafe.CircuitBreaker
The percentage rate of successful executions, from 0 to 100, in the current state when the state is CLOSED or HALF_OPEN.
getSuccessThreshold() - Method in class dev.failsafe.CircuitBreakerConfig
Gets the number of successes that must occur within the success thresholding capacity when in a HALF_OPEN state in order to open the circuit.
getSuccessThresholdingCapacity() - Method in class dev.failsafe.CircuitBreakerConfig
Returns the rolling capacity for storing execution results when performing success thresholding in the HALF_OPEN state.
getTimeout() - Method in class dev.failsafe.TimeoutConfig
Returns the timeout duration.
getTimeout() - Method in exception dev.failsafe.TimeoutExceededException
Returns the Timeout that caused the exception.

H

halfOpen() - Method in interface dev.failsafe.CircuitBreaker
Half-opens the circuit.
handle(Class<? extends Throwable>) - Method in class dev.failsafe.FailurePolicyBuilder
Specifies the exception to handle as a failure.
handle(Class<? extends Throwable>...) - Method in class dev.failsafe.FailurePolicyBuilder
Specifies the exceptions to handle as failures.
handle(List<Class<? extends Throwable>>) - Method in class dev.failsafe.FailurePolicyBuilder
Specifies the exceptions to handle as failures.
handleIf(CheckedPredicate<? extends Throwable>) - Method in class dev.failsafe.FailurePolicyBuilder
Specifies that a failure has occurred if the failurePredicate matches the exception.
handleIf(CheckedBiPredicate<R, ? extends Throwable>) - Method in class dev.failsafe.FailurePolicyBuilder
Specifies that a failure has occurred if the resultPredicate matches the execution result.
handleResult(R) - Method in class dev.failsafe.FailurePolicyBuilder
Specifies that a failure has occurred if the result matches the execution result.
handleResultIf(CheckedPredicate<R>) - Method in class dev.failsafe.FailurePolicyBuilder
Specifies that a failure has occurred if the resultPredicate matches the execution result.
hashCode() - Method in class dev.failsafe.spi.ExecutionResult
 

I

interrupt() - Method in interface dev.failsafe.spi.SyncExecutionInternal
Interrupts the execution.
isAsync() - Method in class dev.failsafe.FallbackConfig
Returns whether the Fallback is configured to handle execution results asynchronously, separate from execution.
isAsyncExecution() - Method in interface dev.failsafe.spi.AsyncExecutionInternal
Returns whether the execution is an async integration execution.
isBursty() - Method in interface dev.failsafe.RateLimiter
Returns whether the rate limiter is bursty.
isCancelled() - Method in interface dev.failsafe.Call
Returns whether the call has been cancelled.
isCancelled() - Method in interface dev.failsafe.ExecutionContext
Returns whether the execution has been cancelled.
isCancelled() - Method in class dev.failsafe.spi.DefaultScheduledFuture
 
isCancelled(PolicyExecutor<R>) - Method in interface dev.failsafe.spi.ExecutionInternal
Returns whether the execution is considered cancelled for the policyExecutor.
isClosed() - Method in interface dev.failsafe.CircuitBreaker
Returns whether the circuit is closed.
isComplete() - Method in interface dev.failsafe.AsyncExecution
Returns whether the execution is complete or if it can be retried.
isComplete() - Method in interface dev.failsafe.Execution
Returns whether the execution is complete or if it can be retried.
isComplete() - Method in class dev.failsafe.spi.ExecutionResult
 
isDone() - Method in class dev.failsafe.spi.DefaultScheduledFuture
 
isExceptionsChecked() - Method in class dev.failsafe.FailurePolicyConfig
Returns whether exceptions are checked by a configured failure condition.
isFailure(R, Throwable) - Method in interface dev.failsafe.spi.FailurePolicy
Returns whether an execution result or exception are considered a failure according to the policy configuration.
isFailure(ExecutionResult<R>) - Method in class dev.failsafe.spi.PolicyExecutor
Returns whether the result is a success according to the policy.
isFirstAttempt() - Method in class dev.failsafe.event.ExecutionEvent
Returns true when ExecutionEvent.getAttemptCount() is 0 meaning this is the first execution attempt.
isFirstAttempt() - Method in interface dev.failsafe.ExecutionContext
Returns true when an execution result has not yet been recorded, meaning this is the first execution attempt.
isHalfOpen() - Method in interface dev.failsafe.CircuitBreaker
Returns whether the circuit is half open.
isInterrupted() - Method in interface dev.failsafe.spi.SyncExecutionInternal
Returns whether the execution is currently interrupted.
isNonResult() - Method in class dev.failsafe.spi.ExecutionResult
 
isOpen() - Method in interface dev.failsafe.CircuitBreaker
Returns whether the circuit is open.
isPostExecuted(int) - Method in interface dev.failsafe.spi.AsyncExecutionInternal
Returns whether the PolicyExecutor corresponding to the policyIndex has already post-executed.
isPreExecuted() - Method in interface dev.failsafe.spi.ExecutionInternal
Returns whether the execution has been pre-executed, indicating the attempt has started.
isRecorded() - Method in interface dev.failsafe.spi.AsyncExecutionInternal
Returns whether one of the public AsyncExecution record or complete methods have been called.
isRetry() - Method in class dev.failsafe.event.ExecutionEvent
Returns true when ExecutionEvent.getAttemptCount() is > 0 meaning the execution is being retried.
isRetry() - Method in interface dev.failsafe.ExecutionContext
Returns true when an execution result has already been recorded, meaning the execution is being retried.
isSmooth() - Method in interface dev.failsafe.RateLimiter
Returns whether the rate limiter is smooth.
isSuccess() - Method in class dev.failsafe.spi.ExecutionResult
 

N

newCall(ContextualRunnable<Void>) - Method in class dev.failsafe.FailsafeExecutor
Returns a call that can execute the runnable until a successful result is returned or the configured policies are exceeded.
newCall(ContextualSupplier<T, T>) - Method in class dev.failsafe.FailsafeExecutor
Returns a call that can execute the supplier until a successful result is returned or the configured policies are exceeded.
none() - Static method in class dev.failsafe.Failsafe
Creates and returns a noop FailsafeExecutor instance that treats any exception as a failure for the purposes of calling event listeners, and provides no additional failure handling.
none() - Static method in interface dev.failsafe.Fallback
Returns a fallback that will return a null if execution fails.
none() - Static method in class dev.failsafe.spi.ExecutionResult
Returns an execution that was completed with a non-result.
nullFuture() - Static method in class dev.failsafe.spi.ExecutionResult
Returns a CompletableFuture that is completed with null.

O

of(int) - Static method in interface dev.failsafe.Bulkhead
Returns a Bulkhead for the maxConcurrency that has zero wait.
of(Policy<R>, Policy<R>...) - Static method in interface dev.failsafe.Execution
Creates a new Execution that will use the outerPolicy and innerPolicies to handle failures.
of(CheckedRunnable) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
of(CheckedSupplier<? extends R>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
of(CheckedConsumer<ExecutionAttemptedEvent<? extends R>>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
of(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends R>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
of(R) - Static method in interface dev.failsafe.Fallback
Returns the fallbackResult to be provided if execution fails.
of(ScheduledExecutorService) - Static method in interface dev.failsafe.spi.Scheduler
Returns a Scheduler adapted from the scheduledExecutorService.
of(ExecutorService) - Static method in interface dev.failsafe.spi.Scheduler
Returns a Scheduler adapted from the executorService.
of(Duration) - Static method in interface dev.failsafe.Timeout
Returns a Timeout that fails an execution with TimeoutExceededException if it exceeds the timeout.
ofDefaults() - Static method in interface dev.failsafe.CircuitBreaker
Creates a count based CircuitBreaker that opens after a single failure, closes after a single success, and has a 1 minute delay by default.
ofDefaults() - Static method in interface dev.failsafe.RetryPolicy
Creates a RetryPolicy that allows 3 execution attempts max with no delay.
ofException(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends Exception>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails and allows an alternative exception to be supplied instead.
ofStage(CheckedSupplier<? extends CompletionStage<R>>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
ofStage(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends CompletionStage<R>>) - Static method in interface dev.failsafe.Fallback
Returns the fallback to be executed if execution fails.
onAbort(EventListener<ExecutionCompletedEvent<R>>) - Method in class dev.failsafe.RetryPolicyBuilder
Registers the listener to be called when an execution is aborted.
onCancel(CheckedRunnable) - Method in interface dev.failsafe.ExecutionContext
Sets the cancelCallback to be called if the execution is cancelled, such as by the resulting Call or CompletableFuture, or a Timeout.
onClose(EventListener<CircuitBreakerStateChangedEvent>) - Method in class dev.failsafe.CircuitBreakerBuilder
Calls the listener when the circuit is closed.
onComplete(EventListener<ExecutionCompletedEvent<R>>) - Method in class dev.failsafe.FailsafeExecutor
Registers the listener to be called when an execution is complete.
onFailedAttempt(EventListener<ExecutionAttemptedEvent<R>>) - Method in class dev.failsafe.FallbackBuilder
Registers the listener to be called when the last execution attempt prior to the fallback failed.
onFailedAttempt(EventListener<ExecutionAttemptedEvent<R>>) - Method in class dev.failsafe.RetryPolicyBuilder
Registers the listener to be called when an execution attempt fails.
onFailure(EventListener<ExecutionCompletedEvent<R>>) - Method in class dev.failsafe.FailsafeExecutor
Registers the listener to be called when an execution fails.
onFailure(EventListener<ExecutionCompletedEvent<R>>) - Method in class dev.failsafe.PolicyBuilder
 
onFailure(EventListener<ExecutionCompletedEvent<R>>) - Method in interface dev.failsafe.PolicyListeners
Registers the listener to be called when the policy fails to handle an execution.
onFailure(ExecutionContext<R>, ExecutionResult<R>) - Method in class dev.failsafe.spi.PolicyExecutor
Performs post-execution handling for a result that is considered a failure according to PolicyExecutor.isFailure(ExecutionResult), possibly creating a new result, else returning the original result.
onFailureAsync(ExecutionContext<R>, ExecutionResult<R>, Scheduler, FailsafeFuture<R>) - Method in class dev.failsafe.spi.PolicyExecutor
Performs potentially asynchrononus post-execution handling for a failed result, possibly creating a new result, else returning the original result.
onHalfOpen(EventListener<CircuitBreakerStateChangedEvent>) - Method in class dev.failsafe.CircuitBreakerBuilder
Calls the listener when the circuit is half-opened.
onOpen(EventListener<CircuitBreakerStateChangedEvent>) - Method in class dev.failsafe.CircuitBreakerBuilder
Calls the listener when the circuit is opened.
onRetriesExceeded(EventListener<ExecutionCompletedEvent<R>>) - Method in class dev.failsafe.RetryPolicyBuilder
Registers the listener to be called when an execution fails and the max retry attempts or max duration are exceeded.
onRetry(EventListener<ExecutionAttemptedEvent<R>>) - Method in class dev.failsafe.RetryPolicyBuilder
Registers the listener to be called when a retry is about to be attempted.
onRetryScheduled(EventListener<ExecutionScheduledEvent<R>>) - Method in class dev.failsafe.RetryPolicyBuilder
Registers the listener to be called when a retry for an async call is about to be scheduled.
onSuccess(EventListener<ExecutionCompletedEvent<R>>) - Method in class dev.failsafe.FailsafeExecutor
Registers the listener to be called when an execution is successful.
onSuccess(EventListener<ExecutionCompletedEvent<R>>) - Method in class dev.failsafe.PolicyBuilder
 
onSuccess(EventListener<ExecutionCompletedEvent<R>>) - Method in interface dev.failsafe.PolicyListeners
Registers the listener to be called when the policy succeeds in handling an execution.
onSuccess(ExecutionResult<R>) - Method in class dev.failsafe.spi.PolicyExecutor
Performs post-execution handling for a result that is considered a success according to PolicyExecutor.isFailure(ExecutionResult).
open() - Method in interface dev.failsafe.CircuitBreaker
Opens the circuit.

P

Policy<R> - Interface in dev.failsafe
A policy for handling executions.
PolicyBuilder<S,C extends PolicyConfig<R>,R> - Class in dev.failsafe
Builds policies.
PolicyBuilder(C) - Constructor for class dev.failsafe.PolicyBuilder
 
PolicyConfig<R> - Class in dev.failsafe
Configuration for a Policy.
PolicyConfig() - Constructor for class dev.failsafe.PolicyConfig
 
PolicyConfig(PolicyConfig<R>) - Constructor for class dev.failsafe.PolicyConfig
 
PolicyExecutor<R> - Class in dev.failsafe.spi
Handles execution and execution results according to a policy.
PolicyExecutor(Policy<R>, int) - Constructor for class dev.failsafe.spi.PolicyExecutor
 
PolicyListeners<S,R> - Interface in dev.failsafe
Configures listeners for a policy execution result.
postExecute(ExecutionInternal<R>, ExecutionResult<R>) - Method in class dev.failsafe.spi.PolicyExecutor
Performs synchronous post-execution handling for a result.
postExecuteAsync(AsyncExecutionInternal<R>, ExecutionResult<R>, Scheduler, FailsafeFuture<R>) - Method in class dev.failsafe.spi.PolicyExecutor
Performs potentially asynchronous post-execution handling for a result.
preExecute() - Method in interface dev.failsafe.spi.ExecutionInternal
Called when execution of the user's supplier is about to begin.
preExecute() - Method in class dev.failsafe.spi.PolicyExecutor
Called before execution to return an alternative result or exception such as if execution is not allowed or needed.
preExecuteAsync(Scheduler, FailsafeFuture<R>) - Method in class dev.failsafe.spi.PolicyExecutor
Called before an async execution to return an alternative result or exception such as if execution is not allowed or needed.
propagateCancellation(Future<R>) - Method in class dev.failsafe.spi.FailsafeFuture
Propogates any previous cancellation to the future, either by cancelling it immediately or setting a cancel function to cancel it later.

R

RateLimiter<R> - Interface in dev.failsafe
A rate limiter allows you to control the rate of executions as a way of preventing system overload.
RateLimiterBuilder<R> - Class in dev.failsafe
Builds RateLimiter instances.
RateLimiterConfig<R> - Class in dev.failsafe
Configuration for a RateLimiter.
RateLimitExceededException - Exception in dev.failsafe
Thrown when an execution exceeds or would exceed a RateLimiter.
RateLimitExceededException(RateLimiter<?>) - Constructor for exception dev.failsafe.RateLimitExceededException
 
record(R, Throwable) - Method in interface dev.failsafe.AsyncExecution
Records an execution result or exception which triggers failure handling, if needed, by the configured policies.
record(R, Throwable) - Method in interface dev.failsafe.Execution
Records an execution result or exception which triggers failure handling, if needed, by the configured policies.
record(ExecutionResult<R>) - Method in interface dev.failsafe.spi.ExecutionInternal
Records the result if the execution has been pre-executed and a result has not already been recorded.
recordAttempt() - Method in interface dev.failsafe.spi.ExecutionInternal
Records an execution attempt which may correspond with an execution result.
recordException(Throwable) - Method in interface dev.failsafe.AsyncExecution
Records an exception which triggers failure handling, if needed, by the configured policies.
recordException(Throwable) - Method in interface dev.failsafe.CircuitBreaker
Records an exception as a success or failure based on the exception configuration.
recordException(Throwable) - Method in interface dev.failsafe.Execution
Records an exception which triggers failure handling, if needed, by the configured policies.
recordFailure() - Method in interface dev.failsafe.CircuitBreaker
Records an execution failure.
recordResult(R) - Method in interface dev.failsafe.AsyncExecution
Records an execution result which triggers failure handling, if needed, by the configured policies.
recordResult(R) - Method in interface dev.failsafe.CircuitBreaker
Records an execution result as a success or failure based on the failure configuration.
recordResult(R) - Method in interface dev.failsafe.Execution
Records an execution result which triggers failure handling, if needed, by the configured policies.
recordSuccess() - Method in interface dev.failsafe.CircuitBreaker
Records an execution success.
releasePermit() - Method in interface dev.failsafe.Bulkhead
Releases a permit to execute.
reservePermit() - Method in interface dev.failsafe.RateLimiter
Reserves a permit to perform an execution against the rate limiter, and returns the time that the caller is expected to wait before acting on the permit.
reservePermits(int) - Method in interface dev.failsafe.RateLimiter
Reserves the permits to perform executions against the rate limiter, and returns the time that the caller is expected to wait before acting on the permits.
RetryPolicy<R> - Interface in dev.failsafe
A policy that defines when retries should be performed.
RetryPolicyBuilder<R> - Class in dev.failsafe
Builds RetryPolicy instances.
RetryPolicyConfig<R> - Class in dev.failsafe
Configuration for a RetryPolicy.
run(CheckedRunnable) - Method in class dev.failsafe.FailsafeExecutor
Executes the runnable until successful or until the configured policies are exceeded.
run(ContextualRunnable<Void>) - Method in class dev.failsafe.FailsafeExecutor
Executes the runnable until successful or until the configured policies are exceeded.
run(AsyncExecution<R>) - Method in interface dev.failsafe.function.AsyncRunnable
 
run() - Method in interface dev.failsafe.function.CheckedRunnable
 
run(ExecutionContext<R>) - Method in interface dev.failsafe.function.ContextualRunnable
 
runAsync(CheckedRunnable) - Method in class dev.failsafe.FailsafeExecutor
Executes the runnable asynchronously until successful or until the configured policies are exceeded.
runAsync(ContextualRunnable<Void>) - Method in class dev.failsafe.FailsafeExecutor
Executes the runnable asynchronously until successful or until the configured policies are exceeded.
runAsyncExecution(AsyncRunnable<Void>) - Method in class dev.failsafe.FailsafeExecutor
This method is intended for integration with asynchronous code.

S

schedule(Callable<?>, long, TimeUnit) - Method in interface dev.failsafe.spi.Scheduler
Schedules the callable to be called after the delay for the unit.
Scheduler - Interface in dev.failsafe.spi
Schedules executions.
setCancelFn(int, BiConsumer<Boolean, ExecutionResult<R>>) - Method in class dev.failsafe.spi.FailsafeFuture
Sets a cancelFn to be called when a PolicyExecutor cancels dependencies with a policyIndex > the given policyIndex, or when this future is cancelled.
setCancelFn(PolicyExecutor<R>, BiConsumer<Boolean, ExecutionResult<R>>) - Method in class dev.failsafe.spi.FailsafeFuture
Sets a cancelFn to be called when a PolicyExecutor cancels dependencies with a policyIndex > the policyIndex of the given policyExecutor, or when this future is cancelled.
setExecution(ExecutionInternal<R>) - Method in class dev.failsafe.spi.FailsafeFuture
Sets the execution representing the most recent attempt, which will be cancelled if this future is cancelled.
setInterruptable(boolean) - Method in interface dev.failsafe.spi.SyncExecutionInternal
Sets whether the execution is currently interruptable.
setPostExecuted(int) - Method in interface dev.failsafe.spi.AsyncExecutionInternal
Sets the PolicyExecutor corresponding to the policyIndex as having post-executed.
smoothBuilder(long, Duration) - Static method in interface dev.failsafe.RateLimiter
Returns a smooth RateLimiterBuilder for the maxExecutions and period, which control how frequently an execution is permitted.
smoothBuilder(Duration) - Static method in interface dev.failsafe.RateLimiter
Returns a smooth RateLimiterBuilder for the maxRate, which controls how frequently an execution is permitted.
success(R) - Static method in class dev.failsafe.spi.ExecutionResult
Returns an ExecutionResult with the result set, complete true and success true.
SyncExecutionInternal<R> - Interface in dev.failsafe.spi
Internal execution APIs.

T

test(T, U) - Method in interface dev.failsafe.function.CheckedBiPredicate
 
test(T) - Method in interface dev.failsafe.function.CheckedPredicate
 
Timeout<R> - Interface in dev.failsafe
A policy that cancels and fails an excecution with a TimeoutExceededException if a timeout is exceeded.
TimeoutBuilder<R> - Class in dev.failsafe
Builds Timeout instances.
TimeoutConfig<R> - Class in dev.failsafe
Configuration for a Timeout.
TimeoutExceededException - Exception in dev.failsafe
Thrown when an execution exceeds a configured Timeout.
TimeoutExceededException(Timeout<?>) - Constructor for exception dev.failsafe.TimeoutExceededException
 
toExecutor(int) - Method in interface dev.failsafe.Policy
Returns a PolicyExecutor capable of handling an execution for the Policy.
toString() - Method in class dev.failsafe.event.ExecutionAttemptedEvent
 
toString() - Method in class dev.failsafe.event.ExecutionCompletedEvent
 
toString() - Method in class dev.failsafe.event.ExecutionScheduledEvent
 
toString() - Method in class dev.failsafe.spi.ExecutionResult
 
tryAcquirePermit() - Method in interface dev.failsafe.Bulkhead
Tries to acquire a permit to perform an execution within the bulkhead, returning immediately without waiting.
tryAcquirePermit(Duration) - Method in interface dev.failsafe.Bulkhead
Tries to acquire a permit to perform an execution within the bulkhead, waiting up to the maxWaitTime until they are available.
tryAcquirePermit() - Method in interface dev.failsafe.CircuitBreaker
Tries to acquire a permit to use the circuit breaker and returns whether a permit was acquired.
tryAcquirePermit() - Method in interface dev.failsafe.RateLimiter
Tries to acquire a permit to perform an execution against the rate limiter, returning immediately without waiting.
tryAcquirePermit(Duration) - Method in interface dev.failsafe.RateLimiter
Tries to acquire a permit to perform an execution against the rate limiter, waiting up to the maxWaitTime until they are available.
tryAcquirePermits(int) - Method in interface dev.failsafe.RateLimiter
Tries to acquire the requested permits to perform executions against the rate limiter, returning immediately without waiting.
tryAcquirePermits(int, Duration) - Method in interface dev.failsafe.RateLimiter
Tries to acquire the requested permits to perform executions against the rate limiter, waiting up to the maxWaitTime until they are available.
tryReservePermit(Duration) - Method in interface dev.failsafe.RateLimiter
Tries to reserve a permit to perform an execution against the rate limiter, and returns the time that the caller is expected to wait before acting on the permit, as long as it's less than the maxWaitTime.
tryReservePermits(int, Duration) - Method in interface dev.failsafe.RateLimiter
Tries to reserve the permits to perform executions against the rate limiter, and returns the time that the caller is expected to wait before acting on the permits, as long as it's less than the maxWaitTime.

V

valueOf(String) - Static method in enum dev.failsafe.CircuitBreaker.State
Returns the enum constant of this type with the specified name.
values() - Static method in enum dev.failsafe.CircuitBreaker.State
Returns an array containing the constants of this enum type, in the order they are declared.

W

with(P, P...) - Static method in class dev.failsafe.Failsafe
Creates and returns a new FailsafeExecutor instance that will handle failures according to the given outerPolicy and policies.
with(List<? extends Policy<R>>) - Static method in class dev.failsafe.Failsafe
Creates and returns a new FailsafeExecutor instance that will handle failures according to the given policies.
with(ScheduledExecutorService) - Method in class dev.failsafe.FailsafeExecutor
Configures the scheduledExecutorService to use for performing asynchronous executions and listener callbacks.
with(ExecutorService) - Method in class dev.failsafe.FailsafeExecutor
Configures the executorService to use for performing asynchronous executions and listener callbacks.
with(Executor) - Method in class dev.failsafe.FailsafeExecutor
Configures the executor to use as a wrapper around executions.
with(Scheduler) - Method in class dev.failsafe.FailsafeExecutor
Configures the scheduler to use for performing asynchronous executions and listener callbacks.
with(long, boolean, boolean) - Method in class dev.failsafe.spi.ExecutionResult
Returns a copy of the ExecutionResult with the delayNanos, complete and success values.
withAsync() - Method in class dev.failsafe.FallbackBuilder
Configures the fallback to run asynchronously.
withBackoff(Duration, Duration) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the delay between retries, exponentially backing off to the maxDelay and multiplying consecutive delays by a factor of 2.
withBackoff(long, long, ChronoUnit) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the delay between retries, exponentially backing off to the maxDelay and multiplying consecutive delays by a factor of 2.
withBackoff(long, long, ChronoUnit, double) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the delay between retries, exponentially backing off to the maxDelay and multiplying consecutive delays by the delayFactor.
withBackoff(Duration, Duration, double) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the delay between retries, exponentially backing off to the maxDelay and multiplying consecutive delays by the delayFactor.
withDelay(Duration) - Method in class dev.failsafe.CircuitBreakerBuilder
Sets the delay to wait in OPEN state before transitioning to half-open.
withDelay(Duration) - Method in class dev.failsafe.DelayablePolicyBuilder
Sets the delay to occur between execution attempts.
withDelay(Duration) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the fixed delay to occur between retries.
withDelay(long, long, ChronoUnit) - Method in class dev.failsafe.RetryPolicyBuilder
Sets a random delay between the delayMin and delayMax (inclusive) to occur between retries.
withDelay(Duration, Duration) - Method in class dev.failsafe.RetryPolicyBuilder
Sets a random delay between the delayMin and delayMax (inclusive) to occur between retries.
withDelay(long) - Method in class dev.failsafe.spi.ExecutionResult
Returns a copy of the ExecutionResult with the delayNanos value.
withDelayFn(ContextualSupplier<R, Duration>) - Method in class dev.failsafe.DelayablePolicyBuilder
Sets the delayFunction that computes the next delay before allowing another execution.
withDelayFnOn(ContextualSupplier<R, Duration>, Class<F>) - Method in class dev.failsafe.DelayablePolicyBuilder
Sets the delayFunction that computes the next delay before allowing another execution.
withDelayFnWhen(ContextualSupplier<R, Duration>, R) - Method in class dev.failsafe.DelayablePolicyBuilder
Sets the delayFunction that computes the next delay before allowing another execution.
withException() - Method in class dev.failsafe.spi.ExecutionResult
Returns a copy of the ExecutionResult with success value of {code false}.
withFailureRateThreshold(int, int, Duration) - Method in class dev.failsafe.CircuitBreakerBuilder
Configures time based failure rate thresholding by setting the percentage rate of failures, from 1 to 100, that must occur within the rolling failureThresholdingPeriod when in a CLOSED state in order to open the circuit.
withFailureThreshold(int) - Method in class dev.failsafe.CircuitBreakerBuilder
Configures count based failure thresholding by setting the number of consecutive failures that must occur when in a CLOSED state in order to open the circuit.
withFailureThreshold(int, int) - Method in class dev.failsafe.CircuitBreakerBuilder
Configures count based failure thresholding by setting the ratio of failures to executions that must occur when in a CLOSED state in order to open the circuit.
withFailureThreshold(int, Duration) - Method in class dev.failsafe.CircuitBreakerBuilder
Configures time based failure thresholding by setting the number of failures that must occur within the failureThresholdingPeriod when in a CLOSED state in order to open the circuit.
withFailureThreshold(int, int, Duration) - Method in class dev.failsafe.CircuitBreakerBuilder
Configures time based failure thresholding by setting the number of failures that must occur within the failureThresholdingPeriod when in a CLOSED state in order to open the circuit.
withInterrupt() - Method in class dev.failsafe.TimeoutBuilder
Configures the policy to interrupt an execution in addition to cancelling it when the timeout is exceeded.
withJitter(double) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the jitterFactor to randomly vary retry delays by.
withJitter(Duration) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the jitter to randomly vary retry delays by.
withMaxAttempts(int) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the max number of execution attempts to perform.
withMaxDuration(Duration) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the max duration to perform retries for, else the execution will be failed.
withMaxRetries(int) - Method in class dev.failsafe.RetryPolicyBuilder
Sets the max number of retries to perform when an execution attempt fails.
withMaxWaitTime(Duration) - Method in class dev.failsafe.BulkheadBuilder
Configures the maxWaitTime to wait for permits to be available.
withMaxWaitTime(Duration) - Method in class dev.failsafe.RateLimiterBuilder
Configures the maxWaitTime to wait for permits to be available.
withNonResult() - Method in class dev.failsafe.spi.ExecutionResult
Returns a copy of the ExecutionResult with a non-result, and complete and success set to true.
withNotComplete() - Method in class dev.failsafe.spi.ExecutionResult
Returns a copy of the ExecutionResult with complete set to false, else this if nothing has changed.
withResult(R) - Method in class dev.failsafe.spi.ExecutionResult
Returns a copy of the ExecutionResult with the result value, and complete and success set to true.
withSuccess() - Method in class dev.failsafe.spi.ExecutionResult
Returns a copy of the ExecutionResult with the complete and success values of true.
withSuccessThreshold(int) - Method in class dev.failsafe.CircuitBreakerBuilder
Configures count based success thresholding by setting the number of consecutive successful executions that must occur when in a HALF_OPEN state in order to close the circuit, else the circuit is re-opened when a failure occurs.
withSuccessThreshold(int, int) - Method in class dev.failsafe.CircuitBreakerBuilder
Configures count based success thresholding by setting the ratio of successful executions that must occur when in a HALF_OPEN state in order to close the circuit.
A B C D E F G H I N O P R S T V W 
Skip navigation links

Copyright © 2022. All rights reserved.