Package | Description |
---|---|
dev.failsafe |
APIs for performing failsafe executions.
|
Modifier and Type | Method and Description |
---|---|
ContextualSupplier<R,Duration> |
DelayablePolicyConfig.getDelayFn()
Returns the function that determines the next delay before another execution can be performed.
|
Modifier and Type | Method and Description |
---|---|
<T extends R> |
FailsafeExecutor.get(ContextualSupplier<T,T> supplier)
Executes the
supplier until a successful result is returned or the configured policies are exceeded. |
<T extends R> |
FailsafeExecutor.getAsync(ContextualSupplier<T,T> supplier)
Executes the
supplier asynchronously until a successful result is returned or the configured policies are
exceeded. |
<T extends R> |
FailsafeExecutor.getStageAsync(ContextualSupplier<T,? extends CompletionStage<T>> supplier)
Executes the
supplier asynchronously until the resulting future is successfully completed or the configured
policies are exceeded. |
<T extends R> |
FailsafeExecutor.newCall(ContextualSupplier<T,T> supplier)
Returns a call that can execute the
supplier until a successful result is returned or the configured
policies are exceeded. |
S |
DelayablePolicyBuilder.withDelayFn(ContextualSupplier<R,Duration> delayFunction)
Sets the
delayFunction that computes the next delay before allowing another execution. |
<F extends Throwable> |
DelayablePolicyBuilder.withDelayFnOn(ContextualSupplier<R,Duration> delayFunction,
Class<F> exception)
Sets the
delayFunction that computes the next delay before allowing another execution. |
S |
DelayablePolicyBuilder.withDelayFnWhen(ContextualSupplier<R,Duration> delayFunction,
R result)
Sets the
delayFunction that computes the next delay before allowing another execution. |
Copyright © 2022. All rights reserved.