- 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
-
- 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
-
- 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.
- 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
-
- CircuitBreakerConfig<R> - Class in dev.failsafe
-
- 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.
- 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
-
- getCloseListener() - Method in class dev.failsafe.CircuitBreakerConfig
-
Returns the close event listener.
- getConfig() - Method in interface dev.failsafe.Bulkhead
-
- getConfig() - Method in interface dev.failsafe.CircuitBreaker
-
- getConfig() - Method in interface dev.failsafe.Fallback
-
- getConfig() - Method in interface dev.failsafe.Policy
-
Returns the policy config.
- getConfig() - Method in interface dev.failsafe.RateLimiter
-
- getConfig() - Method in interface dev.failsafe.RetryPolicy
-
- getConfig() - Method in interface dev.failsafe.spi.DelayablePolicy
-
- getConfig() - Method in interface dev.failsafe.spi.FailurePolicy
-
- getConfig() - Method in interface dev.failsafe.Timeout
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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.
- 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
-
- 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
-
- 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
-
- 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
-
- ofDefaults() - Static method in interface dev.failsafe.CircuitBreaker
-
- 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
-
- 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
-
- 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
-
- 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
-
- open() - Method in interface dev.failsafe.CircuitBreaker
-
Opens the circuit.
- 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
-
- RateLimiterConfig<R> - Class in dev.failsafe
-
- 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
-
- RetryPolicyConfig<R> - Class in dev.failsafe
-
- 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.
- 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.