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

A

abortIf(BiPredicate<R, ? extends Throwable>) - Method in class net.jodah.failsafe.RetryPolicy
Specifies that retries should be aborted if the completionPredicate matches the completion result.
abortIf(Predicate<R>) - Method in class net.jodah.failsafe.RetryPolicy
Specifies that retries should be aborted if the resultPredicate matches the result.
abortOn(Class<? extends Throwable>) - Method in class net.jodah.failsafe.RetryPolicy
Specifies when retries should be aborted.
abortOn(Class<? extends Throwable>...) - Method in class net.jodah.failsafe.RetryPolicy
Specifies when retries should be aborted.
abortOn(List<Class<? extends Throwable>>) - Method in class net.jodah.failsafe.RetryPolicy
Specifies when retries should be aborted.
abortOn(Predicate<? extends Throwable>) - Method in class net.jodah.failsafe.RetryPolicy
Specifies that retries should be aborted if the failurePredicate matches the failure.
abortWhen(R) - Method in class net.jodah.failsafe.RetryPolicy
Specifies that retries should be aborted if the execution result matches the result.
AbstractExecution - Class in net.jodah.failsafe
Common execution information.
accept(T) - Method in interface net.jodah.failsafe.function.CheckedConsumer
 
allowsExecution() - Method in class net.jodah.failsafe.CircuitBreaker
Returns whether the circuit allows execution and triggers a state transition if a threshold has been exceeded.
allowsRetries() - Method in class net.jodah.failsafe.RetryPolicy
Returns whether the policy allows retries according to the configured maxRetries and maxDuration.
apply(T) - Method in interface net.jodah.failsafe.function.CheckedFunction
 
AsyncExecution - Class in net.jodah.failsafe
Tracks asynchronous executions and allows retries to be scheduled according to a RetryPolicy.
AsyncRunnable - Interface in net.jodah.failsafe.function
A Runnable that manually triggers asynchronous retries or completion via an asynchronous execution.
AsyncSupplier<T> - Interface in net.jodah.failsafe.function
A Supplier that manually triggers asynchronous retries or completion via an asynchronous execution.

C

canCancel() - Method in class net.jodah.failsafe.Timeout
Returns whether the policy can cancel an execution if the timeout is exceeded.
cancel(boolean) - Method in class net.jodah.failsafe.FailsafeFuture
Cancels this and the internal delegate.
cancel(boolean) - Method in class net.jodah.failsafe.util.concurrent.DefaultScheduledFuture
 
canInterrupt() - Method in class net.jodah.failsafe.Timeout
Returns whether the policy can interrupt an execution if the timeout is exceeded.
canRetryFor(Object) - Method in class net.jodah.failsafe.Execution
Records an execution and returns true if a retry can be performed for the result, else returns false and marks the execution as complete.
canRetryFor(Object, Throwable) - Method in class net.jodah.failsafe.Execution
Records an execution and returns true if a retry can be performed for the result or failure, else returns false and marks the execution as complete.
canRetryOn(Throwable) - Method in class net.jodah.failsafe.Execution
Records an execution and returns true if a retry can be performed for the failure, else returns false and marks the execution as complete.
CheckedConsumer<T> - Interface in net.jodah.failsafe.function
A Consumer that throws checked exceptions.
CheckedFunction<T,R> - Interface in net.jodah.failsafe.function
A Function that throws checked exceptions.
CheckedRunnable - Interface in net.jodah.failsafe.function
A Runnable that throws checked exceptions.
CheckedSupplier<T> - Interface in net.jodah.failsafe.function
A Supplier that throws checked exceptions.
CircuitBreaker<R> - Class in net.jodah.failsafe
A circuit breaker temporarily blocks execution when a configured number of failures are exceeded.
CircuitBreaker() - Constructor for class net.jodah.failsafe.CircuitBreaker
Creates a count based circuit breaker that opens after a single failure, closes after a single success, and has a 1 minute delay by default.
CircuitBreaker.State - Enum in net.jodah.failsafe
The state of the circuit.
CircuitBreakerOpenException - Exception in net.jodah.failsafe
Thrown when an execution is attempted while a configured CircuitBreaker is open.
CircuitBreakerOpenException(CircuitBreaker) - Constructor for exception net.jodah.failsafe.CircuitBreakerOpenException
 
close() - Method in class net.jodah.failsafe.CircuitBreaker
Closes the circuit.
compareTo(Delayed) - Method in class net.jodah.failsafe.util.concurrent.DefaultScheduledFuture
 
complete() - Method in class net.jodah.failsafe.AsyncExecution
Completes the execution and the associated CompletableFuture.
complete(Object) - Method in class net.jodah.failsafe.AsyncExecution
Attempts to complete the execution and the associated CompletableFuture with the result.
complete(Object, Throwable) - Method in class net.jodah.failsafe.AsyncExecution
Attempts to complete the execution and the associated CompletableFuture with the result and failure.
complete() - Method in class net.jodah.failsafe.Execution
Records and completes the execution successfully.
complete(Object) - Method in class net.jodah.failsafe.Execution
Records and attempts to complete the execution with the result.
complete(T) - Method in class net.jodah.failsafe.FailsafeFuture
If not already completed, completes the future with the value, calling the complete and success handlers.
completeExceptionally(Throwable) - Method in class net.jodah.failsafe.FailsafeFuture
If not already completed, completes the future with the failure, calling the complete and failure handlers.
computeDelay(ExecutionContext) - Method in class net.jodah.failsafe.DelayablePolicy
Returns a computed delay for the result and context else null if no delay function is configured or the computed delay is invalid.
computeDelay(R, F, ExecutionContext) - Method in interface net.jodah.failsafe.function.DelayFunction
Returns the amount of delay before the next Policy execution attempt based on the result or failure of the last attempt and the execution context (executions so far).
ContextualRunnable - Interface in net.jodah.failsafe.function
A Runnable that provides execution context.
ContextualSupplier<T> - Interface in net.jodah.failsafe.function
A Supplier that provides execution context.
copy() - Method in class net.jodah.failsafe.ExecutionContext
 
copy() - Method in class net.jodah.failsafe.RetryPolicy
Returns a copy of this RetryPolicy.

D

DEFAULT - Static variable in interface net.jodah.failsafe.util.concurrent.Scheduler
The default scheduler used by Failsafe if no other scheduler or ScheduledExecutorService is configured for an execution.
DefaultScheduledFuture<T> - Class in net.jodah.failsafe.util.concurrent
A default ScheduledFuture implementation.
DefaultScheduledFuture() - Constructor for class net.jodah.failsafe.util.concurrent.DefaultScheduledFuture
 
DelayablePolicy<S,R> - Class in net.jodah.failsafe
A policy that can be delayed between executions.
DelayablePolicy() - Constructor for class net.jodah.failsafe.DelayablePolicy
 
DelayFunction<R,F extends Throwable> - Interface in net.jodah.failsafe.function
A functional interface for computing delays between Policy execution attempts.

E

equals(Object) - Method in class net.jodah.failsafe.ExecutionResult
 
Execution - Class in net.jodah.failsafe
Tracks executions and determines when an execution can be performed for a RetryPolicy.
Execution(Policy...) - Constructor for class net.jodah.failsafe.Execution
Creates a new Execution that will use the policies to handle failures.
execution - Variable in class net.jodah.failsafe.PolicyExecutor
 
ExecutionAttemptedEvent<R> - Class in net.jodah.failsafe.event
Indicates an execution was attempted.
ExecutionAttemptedEvent(R, Throwable, ExecutionContext) - Constructor for class net.jodah.failsafe.event.ExecutionAttemptedEvent
 
ExecutionCompletedEvent<R> - Class in net.jodah.failsafe.event
Indicates an execution was completed.
ExecutionCompletedEvent(R, Throwable, ExecutionContext) - Constructor for class net.jodah.failsafe.event.ExecutionCompletedEvent
 
ExecutionContext - Class in net.jodah.failsafe
Contextual execution information.
ExecutionEvent - Class in net.jodah.failsafe.event
Encapsulates information about a Failsafe execution.
ExecutionResult - Class in net.jodah.failsafe
The result of an execution.
ExecutionResult(Object, Throwable) - Constructor for class net.jodah.failsafe.ExecutionResult
Records an initial execution result with complete true and success set to true if failure is not null.

F

Failsafe - Class in net.jodah.failsafe
Simple, sophisticated failure handling.
Failsafe() - Constructor for class net.jodah.failsafe.Failsafe
 
FailsafeException - Exception in net.jodah.failsafe
Thrown when a synchronous Failsafe execution fails with an exception.
FailsafeException() - Constructor for exception net.jodah.failsafe.FailsafeException
 
FailsafeException(Throwable) - Constructor for exception net.jodah.failsafe.FailsafeException
 
FailsafeExecutor<R> - Class in net.jodah.failsafe
An executor that handles failures according to configured policies.
FailsafeFuture<T> - Class in net.jodah.failsafe
A CompletableFuture implementation that propogates cancellations and calls completion handlers.
failure(Throwable) - Static method in class net.jodah.failsafe.ExecutionResult
Returns a an ExecutionResult with the failure set, complete true and success false.
FailurePolicy<S,R> - Class in net.jodah.failsafe
A Policy that captures conditions to determine whether an execution is a failure.
Fallback<R> - Class in net.jodah.failsafe
A Policy that handles failures using a fallback function or result.

G

get(CheckedSupplier<T>) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the supplier until a successful result is returned or the configured policies are exceeded.
get(ContextualSupplier<T>) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the supplier until a successful result is returned or the configured policies are exceeded.
get(AsyncExecution) - Method in interface net.jodah.failsafe.function.AsyncSupplier
 
get() - Method in interface net.jodah.failsafe.function.CheckedSupplier
 
get(ExecutionContext) - Method in interface net.jodah.failsafe.function.ContextualSupplier
 
get() - Method in class net.jodah.failsafe.util.concurrent.DefaultScheduledFuture
 
get(long, TimeUnit) - Method in class net.jodah.failsafe.util.concurrent.DefaultScheduledFuture
 
getAsync(CheckedSupplier<T>) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the supplier asynchronously until a successful result is returned or the configured policies are exceeded.
getAsync(ContextualSupplier<T>) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the supplier asynchronously until a successful result is returned or the configured policies are exceeded.
getAsyncExecution(AsyncSupplier<T>) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the supplier asynchronously until a successful result is returned or the configured policies are exceeded.
getAttemptCount() - Method in class net.jodah.failsafe.event.ExecutionEvent
Gets the number of completed execution attempts so far.
getAttemptCount() - Method in class net.jodah.failsafe.ExecutionContext
Gets the number of completed execution attempts so far.
getCircuitBreaker() - Method in exception net.jodah.failsafe.CircuitBreakerOpenException
Retruns the CircuitBreaker that caused the exception.
getDelay() - Method in class net.jodah.failsafe.CircuitBreaker
Returns the delay before allowing another execution on the circuit.
getDelay() - Method in class net.jodah.failsafe.RetryPolicy
Returns the delay between retries.
getDelay(TimeUnit) - Method in class net.jodah.failsafe.util.concurrent.DefaultScheduledFuture
 
getDelayFactor() - Method in class net.jodah.failsafe.RetryPolicy
Returns the delay factor for backoff retries.
getDelayFn() - Method in class net.jodah.failsafe.DelayablePolicy
Returns the function that determines the next delay before allowing another execution.
getDelayMax() - Method in class net.jodah.failsafe.RetryPolicy
Returns the max delay between retries.
getDelayMin() - Method in class net.jodah.failsafe.RetryPolicy
Returns the min delay between retries.
getElapsedAttemptTime() - Method in class net.jodah.failsafe.ExecutionContext
Returns the elapsed time since the last execution attempt began.
getElapsedTime() - Method in class net.jodah.failsafe.event.ExecutionEvent
Returns the elapsed time since initial execution began.
getElapsedTime() - Method in class net.jodah.failsafe.ExecutionContext
Returns the elapsed time since initial execution began.
getExecutionCount() - Method in class net.jodah.failsafe.CircuitBreaker
Returns the number of executions recorded in the current state when the state is CLOSED or HALF_OPEN.
getFailure() - Method in class net.jodah.failsafe.event.ExecutionCompletedEvent
Returns the failure that preceeded the event, else null if there was none.
getFailure() - Method in class net.jodah.failsafe.ExecutionResult
 
getFailureCount() - Method in class net.jodah.failsafe.CircuitBreaker
Returns the number of failures recorded in the current state when the state is CLOSED or HALF_OPEN.
getFailureExecutionThreshold() - Method in class net.jodah.failsafe.CircuitBreaker
Used with time based thresholding.
getFailureRate() - Method in class net.jodah.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 net.jodah.failsafe.CircuitBreaker
Used with time based thresholding.
getFailureThreshold() - Method in class net.jodah.failsafe.CircuitBreaker
Gets the number of successive 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 net.jodah.failsafe.CircuitBreaker
Returns the rolling capacity for storing execution results when performing failure thresholding in the CLOSED or HALF_OPEN states.
getFailureThresholdingPeriod() - Method in class net.jodah.failsafe.CircuitBreaker
Used with time based thresholding.
getJitter() - Method in class net.jodah.failsafe.RetryPolicy
Returns the jitter, else null if none has been configured.
getJitterFactor() - Method in class net.jodah.failsafe.RetryPolicy
Returns the jitter factor, else 0.0 if none has been configured.
getLastFailure() - Method in class net.jodah.failsafe.event.ExecutionAttemptedEvent
Returns the failure that preceeded the event, else null if there was none.
getLastFailure() - Method in class net.jodah.failsafe.ExecutionContext
Returns the last failure that was recorded else null.
getLastResult() - Method in class net.jodah.failsafe.event.ExecutionAttemptedEvent
Returns the result that preceeded the event, else null if there was none.
getLastResult() - Method in class net.jodah.failsafe.ExecutionContext
Returns the last result that was recorded else null.
getLastResult(T) - Method in class net.jodah.failsafe.ExecutionContext
Returns the last result that was recorded else the defaultValue.
getMaxAttempts() - Method in class net.jodah.failsafe.RetryPolicy
Returns the max number of execution attempts to perform.
getMaxDelay() - Method in class net.jodah.failsafe.RetryPolicy
Returns the max delay between backoff retries.
getMaxDuration() - Method in class net.jodah.failsafe.RetryPolicy
Returns the max duration to perform retries for.
getMaxRetries() - Method in class net.jodah.failsafe.RetryPolicy
Returns the max number of retries to perform when an execution attempt fails.
getRemainingDelay() - Method in class net.jodah.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 net.jodah.failsafe.event.ExecutionCompletedEvent
Returns the result that preceeded the event, else null if there was none.
getResult() - Method in class net.jodah.failsafe.ExecutionResult
 
getStageAsync(CheckedSupplier<? extends CompletionStage<T>>) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the supplier asynchronously until the resulting future is successfully completed or the configured policies are exceeded.
getStageAsync(ContextualSupplier<? extends CompletionStage<T>>) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the supplier asynchronously until the resulting future is successfully completed or the configured policies are exceeded.
getStageAsyncExecution(AsyncSupplier<? extends CompletionStage<T>>) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the supplier asynchronously until the resulting future is successfully completed or the configured policies are exceeded.
getStartTime() - Method in class net.jodah.failsafe.event.ExecutionEvent
Returns the time that the initial execution started.
getStartTime() - Method in class net.jodah.failsafe.ExecutionContext
Returns the time that the initial execution started.
getState() - Method in class net.jodah.failsafe.CircuitBreaker
Gets the state of the circuit.
getSuccessCount() - Method in class net.jodah.failsafe.CircuitBreaker
Returns the number of successes recorded in the current state when the state is CLOSED or HALF_OPEN.
getSuccessRate() - Method in class net.jodah.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 net.jodah.failsafe.CircuitBreaker
Gets the number of successive 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 net.jodah.failsafe.CircuitBreaker
Returns the rolling capacity for storing execution results when performing success thresholding in the HALF_OPEN state.
getTimeout() - Method in class net.jodah.failsafe.Timeout
Returns the timeout duration.
getTimeout() - Method in exception net.jodah.failsafe.TimeoutExceededException
Retruns the Timeout that caused the exception.
getWaitNanos() - Method in class net.jodah.failsafe.ExecutionResult
 
getWaitTime() - Method in class net.jodah.failsafe.AbstractExecution
Returns the time to wait before the next execution attempt.

H

halfOpen() - Method in class net.jodah.failsafe.CircuitBreaker
Half-opens the circuit.
handle(Class<? extends Throwable>) - Method in class net.jodah.failsafe.FailurePolicy
Specifies the failure to handle.
handle(Class<? extends Throwable>...) - Method in class net.jodah.failsafe.FailurePolicy
Specifies the failures to handle.
handle(List<Class<? extends Throwable>>) - Method in class net.jodah.failsafe.FailurePolicy
Specifies the failures to handle.
handleIf(Predicate<? extends Throwable>) - Method in class net.jodah.failsafe.FailurePolicy
Specifies that a failure has occurred if the failurePredicate matches the failure.
handleIf(BiPredicate<R, ? extends Throwable>) - Method in class net.jodah.failsafe.FailurePolicy
Specifies that a failure has occurred if the resultPredicate matches the execution result.
handleResult(R) - Method in class net.jodah.failsafe.FailurePolicy
Specifies that a failure has occurred if the result matches the execution result.
handleResultIf(Predicate<R>) - Method in class net.jodah.failsafe.FailurePolicy
Specifies that a failure has occurred if the resultPredicate matches the execution result.
hashCode() - Method in class net.jodah.failsafe.ExecutionResult
 

I

isAbortable(R, Throwable) - Method in class net.jodah.failsafe.RetryPolicy
Returns whether an execution result can be aborted given the configured abort conditions.
isAsync() - Method in class net.jodah.failsafe.Fallback
Returns whether the Fallback is configured to handle execution results asynchronously, separate from execution..
isCancelled() - Method in class net.jodah.failsafe.ExecutionContext
Returns whether the execution has ben cancelled.
isCancelled() - Method in class net.jodah.failsafe.util.concurrent.DefaultScheduledFuture
 
isClosed() - Method in class net.jodah.failsafe.CircuitBreaker
Returns whether the circuit is closed.
isComplete() - Method in class net.jodah.failsafe.AbstractExecution
Returns whether the execution is complete or if it can be retried.
isComplete() - Method in class net.jodah.failsafe.ExecutionResult
 
isDone() - Method in class net.jodah.failsafe.util.concurrent.DefaultScheduledFuture
 
isFailure(R, Throwable) - Method in class net.jodah.failsafe.FailurePolicy
Returns whether an execution result can be retried given the configured failure conditions.
isFailure(ExecutionResult) - Method in class net.jodah.failsafe.PolicyExecutor
Returns whether the result is a success according to the policy.
isFirstAttempt() - Method in class net.jodah.failsafe.ExecutionContext
Returns true when ExecutionContext.getAttemptCount() is 0 meaning this is the first execution attempt.
isHalfOpen() - Method in class net.jodah.failsafe.CircuitBreaker
Returns whether the circuit is half open.
isNonResult() - Method in class net.jodah.failsafe.ExecutionResult
 
isOpen() - Method in class net.jodah.failsafe.CircuitBreaker
Returns whether the circuit is open.
isRetry() - Method in class net.jodah.failsafe.ExecutionContext
Returns true when ExecutionContext.getAttemptCount() is > 0 meaning the execution is being retried.
isSuccess() - Method in class net.jodah.failsafe.ExecutionResult
 

N

net.jodah.failsafe - package net.jodah.failsafe
Core Failsafe APIs for performing failsafe executions.
net.jodah.failsafe.event - package net.jodah.failsafe.event
Event listener types.
net.jodah.failsafe.function - package net.jodah.failsafe.function
Functional interface types.
net.jodah.failsafe.util.concurrent - package net.jodah.failsafe.util.concurrent
Concurrent utilities.

O

of(CheckedRunnable) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed if execution fails.
of(CheckedSupplier<? extends R>) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed if execution fails.
of(CheckedConsumer<ExecutionAttemptedEvent<? extends R>>) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed if execution fails.
of(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends R>) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed if execution fails.
of(R) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback result to be returned if execution fails.
of(Duration) - Static method in class net.jodah.failsafe.Timeout
Returns a Timeout that fails an execution with TimeoutExceededException if it exceeds the timeout.
of(ScheduledExecutorService) - Static method in interface net.jodah.failsafe.util.concurrent.Scheduler
Returns a Scheduler adapted from the executor.
of(ExecutorService) - Static method in interface net.jodah.failsafe.util.concurrent.Scheduler
Returns a Scheduler adapted from the executor.
ofAsync(CheckedRunnable) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed asynchronously if execution fails.
ofAsync(CheckedSupplier<? extends R>) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed asynchronously if execution fails.
ofAsync(CheckedConsumer<ExecutionAttemptedEvent<? extends R>>) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed asynchronously if execution fails.
ofAsync(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends R>) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed asynchronously if execution fails.
ofException(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends Exception>) - Static method in class net.jodah.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 class net.jodah.failsafe.Fallback
Returns the fallback to be executed if execution fails.
ofStage(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends CompletionStage<R>>) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed if execution fails.
ofStageAsync(CheckedSupplier<? extends CompletionStage<R>>) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed asynchronously if execution fails.
ofStageAsync(CheckedFunction<ExecutionAttemptedEvent<? extends R>, ? extends CompletionStage<R>>) - Static method in class net.jodah.failsafe.Fallback
Returns the fallback to be executed asynchronously if execution fails.
onAbort(CheckedConsumer<? extends ExecutionCompletedEvent<R>>) - Method in class net.jodah.failsafe.RetryPolicy
Registers the listener to be called when an execution is aborted.
onClose(CheckedRunnable) - Method in class net.jodah.failsafe.CircuitBreaker
Calls the runnable when the circuit is closed.
onComplete(CheckedConsumer<? extends ExecutionCompletedEvent<R>>) - Method in class net.jodah.failsafe.FailsafeExecutor
Registers the listener to be called when an execution is complete for all of the configured policies are exceeded.
onFailedAttempt(CheckedConsumer<? extends ExecutionAttemptedEvent<R>>) - Method in class net.jodah.failsafe.Fallback
Registers the listener to be called when an execution attempt fails.
onFailedAttempt(CheckedConsumer<? extends ExecutionAttemptedEvent<R>>) - Method in class net.jodah.failsafe.RetryPolicy
Registers the listener to be called when an execution attempt fails.
onFailure(CheckedConsumer<? extends ExecutionCompletedEvent<R>>) - Method in class net.jodah.failsafe.FailsafeExecutor
Registers the listener to be called when an execution fails.
onFailure(ExecutionResult) - Method in class net.jodah.failsafe.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.
onFailure(CheckedConsumer<? extends ExecutionCompletedEvent<R>>) - Method in class net.jodah.failsafe.PolicyListeners
Registers the listener to be called when a Policy fails to handle an execution.
onFailureAsync(ExecutionResult, Scheduler, FailsafeFuture<Object>) - Method in class net.jodah.failsafe.PolicyExecutor
Performs potentially asynchrononus post-execution handling for a failed result, possibly creating a new result, else returning the original result.
onHalfOpen(CheckedRunnable) - Method in class net.jodah.failsafe.CircuitBreaker
Calls the runnable when the circuit is half-opened.
onOpen(CheckedRunnable) - Method in class net.jodah.failsafe.CircuitBreaker
Calls the runnable when the circuit is opened.
onRetriesExceeded(CheckedConsumer<? extends ExecutionCompletedEvent<R>>) - Method in class net.jodah.failsafe.RetryPolicy
Registers the listener to be called when an execution fails and the max retry attempts or max duration are exceeded.
onRetry(CheckedConsumer<? extends ExecutionAttemptedEvent<R>>) - Method in class net.jodah.failsafe.RetryPolicy
Registers the listener to be called before an execution is retried.
onSuccess(CheckedConsumer<? extends ExecutionCompletedEvent<R>>) - Method in class net.jodah.failsafe.FailsafeExecutor
Registers the listener to be called when an execution is successful.
onSuccess(ExecutionResult) - Method in class net.jodah.failsafe.PolicyExecutor
Performs post-execution handling for a result that is considered a success according to PolicyExecutor.isFailure(ExecutionResult).
onSuccess(CheckedConsumer<? extends ExecutionCompletedEvent<R>>) - Method in class net.jodah.failsafe.PolicyListeners
Registers the listener to be called when a Policy succeeds in handling an execution.
open() - Method in class net.jodah.failsafe.CircuitBreaker
Opens the circuit.

P

Policy<R> - Interface in net.jodah.failsafe
A policy for handling execution failures.
policy - Variable in class net.jodah.failsafe.PolicyExecutor
 
PolicyExecutor<P extends Policy> - Class in net.jodah.failsafe
Handles execution and execution results according to a policy.
PolicyExecutor(P, AbstractExecution) - Constructor for class net.jodah.failsafe.PolicyExecutor
 
PolicyListeners<S,R> - Class in net.jodah.failsafe
Policy listener configuration.
PolicyListeners() - Constructor for class net.jodah.failsafe.PolicyListeners
 
postExecute(ExecutionResult) - Method in class net.jodah.failsafe.PolicyExecutor
Performs synchronous post-execution handling for a result.
postExecuteAsync(ExecutionResult, Scheduler, FailsafeFuture<Object>) - Method in class net.jodah.failsafe.PolicyExecutor
Performs potentially asynchronous post-execution handling for a result.
preExecute() - Method in class net.jodah.failsafe.CircuitBreaker
Records an execution that is about to take place by incrementing the internal executions count.
preExecute() - Method in class net.jodah.failsafe.PolicyExecutor
Called before execution to return an alternative result or failure such as if execution is not allowed or needed.

R

recordFailure() - Method in class net.jodah.failsafe.CircuitBreaker
Records an execution failure.
recordFailure(Throwable) - Method in class net.jodah.failsafe.CircuitBreaker
Records an execution failure as a success or failure based on the failure configuration as determined by #isFailure(R, Throwable).
recordFailure(Throwable) - Method in class net.jodah.failsafe.Execution
Records a failed execution and returns true if a retry can be performed for the failure, else returns false and completes the execution.
recordResult(R) - Method in class net.jodah.failsafe.CircuitBreaker
Records an execution result as a success or failure based on the failure configuration as determined by #isFailure(R, Throwable).
recordSuccess() - Method in class net.jodah.failsafe.CircuitBreaker
Records an execution success.
retry() - Method in class net.jodah.failsafe.AsyncExecution
Records an execution if one has not been recorded yet, attempts to schedule a retry if necessary, and returns true if a retry has been scheduled else returns false and completes the execution and associated CompletableFuture.
retryFor(Object) - Method in class net.jodah.failsafe.AsyncExecution
Records an execution if one has not been recorded yet for the result, attempts to schedule a retry if necessary, and returns true if a retry has been scheduled else returns false and completes the execution and associated CompletableFuture.
retryFor(Object, Throwable) - Method in class net.jodah.failsafe.AsyncExecution
Records an execution if one has not been recorded yet for the result or failure, attempts to schedule a retry if necessary, and returns true if a retry has been scheduled else returns false and completes the execution and associated CompletableFuture.
retryOn(Throwable) - Method in class net.jodah.failsafe.AsyncExecution
Records an execution and returns true if a retry has been scheduled for the failure, else returns false and marks the execution and associated CompletableFuture as complete.
RetryPolicy<R> - Class in net.jodah.failsafe
A policy that defines when retries should be performed.
RetryPolicy() - Constructor for class net.jodah.failsafe.RetryPolicy
Creates a retry policy that allows 3 execution attempts max with no delay.
run(CheckedRunnable) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the runnable until successful or until the configured policies are exceeded.
run(ContextualRunnable) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the runnable until successful or until the configured policies are exceeded.
run(AsyncExecution) - Method in interface net.jodah.failsafe.function.AsyncRunnable
 
run() - Method in interface net.jodah.failsafe.function.CheckedRunnable
 
run(ExecutionContext) - Method in interface net.jodah.failsafe.function.ContextualRunnable
 
runAsync(CheckedRunnable) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the runnable asynchronously until successful or until the configured policies are exceeded.
runAsync(ContextualRunnable) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the runnable asynchronously until successful or until the configured policies are exceeded.
runAsyncExecution(AsyncRunnable) - Method in class net.jodah.failsafe.FailsafeExecutor
Executes the runnable asynchronously until successful or until the configured policies are exceeded.

S

schedule(Callable<?>, long, TimeUnit) - Method in interface net.jodah.failsafe.util.concurrent.Scheduler
Schedules the callable to be called after the delay for the unit.
Scheduler - Interface in net.jodah.failsafe.util.concurrent
Schedules executions.
success(Object) - Static method in class net.jodah.failsafe.ExecutionResult
Returns a an ExecutionResult with the result set, complete true and success true.
supply(Supplier<ExecutionResult>, Scheduler) - Method in class net.jodah.failsafe.PolicyExecutor
Performs an execution by calling pre-execute else calling the supplier and doing a post-execute.
supplyAsync(Supplier<CompletableFuture<ExecutionResult>>, Scheduler, FailsafeFuture<Object>) - Method in class net.jodah.failsafe.PolicyExecutor
Performs an async execution by calling pre-execute else calling the supplier and doing a post-execute.

T

Timeout<R> - Class in net.jodah.failsafe
A policy that fails an excecution with a TimeoutExceededException if it exceeds a timeout.
TimeoutExceededException - Exception in net.jodah.failsafe
Thrown when an execution exceeds a configured Timeout.
TimeoutExceededException(Timeout) - Constructor for exception net.jodah.failsafe.TimeoutExceededException
 
toExecutor(AbstractExecution) - Method in class net.jodah.failsafe.CircuitBreaker
 
toExecutor(AbstractExecution) - Method in class net.jodah.failsafe.Fallback
 
toExecutor(AbstractExecution) - Method in interface net.jodah.failsafe.Policy
Returns an PolicyExecutor capable of performing an execution in the context of a Policy and handling results according to the Policy.
toExecutor(AbstractExecution) - Method in class net.jodah.failsafe.RetryPolicy
 
toExecutor(AbstractExecution) - Method in class net.jodah.failsafe.Timeout
 
toString() - Method in class net.jodah.failsafe.CircuitBreaker
 
toString() - Method in class net.jodah.failsafe.event.ExecutionAttemptedEvent
 
toString() - Method in class net.jodah.failsafe.event.ExecutionCompletedEvent
 
toString() - Method in class net.jodah.failsafe.ExecutionContext
 
toString() - Method in class net.jodah.failsafe.ExecutionResult
 

V

valueOf(String) - Static method in enum net.jodah.failsafe.CircuitBreaker.State
Returns the enum constant of this type with the specified name.
values() - Static method in enum net.jodah.failsafe.CircuitBreaker.State
Returns an array containing the constants of this enum type, in the order they are declared.
VOID - Static variable in class net.jodah.failsafe.Fallback
A fallback that will return a void result if execution fails.

W

with(long, boolean, boolean) - Method in class net.jodah.failsafe.ExecutionResult
Returns a copy of the ExecutionResult with the waitNanos, complete and success values.
with(P...) - Static method in class net.jodah.failsafe.Failsafe
Creates and returns a new FailsafeExecutor instance that will handle failures according to the given policies.
with(List<? extends Policy<R>>) - Static method in class net.jodah.failsafe.Failsafe
Creates and returns a new FailsafeExecutor instance that will handle failures according to the given policies.
with(ScheduledExecutorService) - Method in class net.jodah.failsafe.FailsafeExecutor
Configures the executor to use for performing asynchronous executions and listener callbacks.
with(ExecutorService) - Method in class net.jodah.failsafe.FailsafeExecutor
Configures the executor to use for performing asynchronous executions and listener callbacks.
with(Scheduler) - Method in class net.jodah.failsafe.FailsafeExecutor
Configures the scheduler to use for performing asynchronous executions and listener callbacks.
withBackoff(long, long, ChronoUnit) - Method in class net.jodah.failsafe.RetryPolicy
Sets the delay between retries, exponentially backing off to the maxDelay and multiplying successive delays by a factor of 2.
withBackoff(long, long, ChronoUnit, double) - Method in class net.jodah.failsafe.RetryPolicy
Sets the delay between retries, exponentially backing off to the maxDelay and multiplying successive delays by the delayFactor.
withCancel(boolean) - Method in class net.jodah.failsafe.Timeout
Configures the policy to cancel an execution if it times out.
withDelay(Duration) - Method in class net.jodah.failsafe.CircuitBreaker
Sets the delay to wait in OPEN state before transitioning to half-open.
withDelay(DelayFunction<R, ? extends Throwable>) - Method in class net.jodah.failsafe.DelayablePolicy
Sets the delayFunction that computes the next delay before allowing another execution.
withDelay(Duration) - Method in class net.jodah.failsafe.RetryPolicy
Sets the delay to occur between retries.
withDelay(long, long, ChronoUnit) - Method in class net.jodah.failsafe.RetryPolicy
Sets a random delay between the delayMin and delayMax (inclusive) to occur between retries.
withDelayOn(DelayFunction<R, F>, Class<F>) - Method in class net.jodah.failsafe.DelayablePolicy
Sets the delayFunction that computes the next delay before allowing another execution.
withDelayWhen(DelayFunction<R, ? extends Throwable>, R) - Method in class net.jodah.failsafe.DelayablePolicy
Sets the delayFunction that computes the next delay before allowing another execution.
withFailureRateThreshold(int, int, Duration) - Method in class net.jodah.failsafe.CircuitBreaker
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 net.jodah.failsafe.CircuitBreaker
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 net.jodah.failsafe.CircuitBreaker
Configures count based failure thresholding by setting the ratio of successive failures to executions that must occur when in a CLOSED state in order to open the circuit.
withFailureThreshold(int, Duration) - Method in class net.jodah.failsafe.CircuitBreaker
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 net.jodah.failsafe.CircuitBreaker
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.
withJitter(double) - Method in class net.jodah.failsafe.RetryPolicy
Sets the jitterFactor to randomly vary retry delays by.
withJitter(Duration) - Method in class net.jodah.failsafe.RetryPolicy
Sets the jitter to randomly vary retry delays by.
withMaxAttempts(int) - Method in class net.jodah.failsafe.RetryPolicy
Sets the max number of execution attempts to perform.
withMaxDuration(Duration) - Method in class net.jodah.failsafe.RetryPolicy
Sets the max duration to perform retries for, else the execution will be failed.
withMaxRetries(int) - Method in class net.jodah.failsafe.RetryPolicy
Sets the max number of retries to perform when an execution attempt fails.
withResult(Object) - Method in class net.jodah.failsafe.ExecutionResult
Returns a copy of the ExecutionResult with the result value, and complete and success set to true.
withSuccessThreshold(int) - Method in class net.jodah.failsafe.CircuitBreaker
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 net.jodah.failsafe.CircuitBreaker
Configures count based success thresholding by setting the ratio of successive successful executions that must occur when in a HALF_OPEN state in order to close the circuit.
withWaitNanos(long) - Method in class net.jodah.failsafe.ExecutionResult
Returns a copy of the ExecutionResult with the waitNanos value.
A C D E F G H I N O P R S T V W 
Skip navigation links

Copyright © 2020. All rights reserved.