private <T> T |
FailsafeExecutor.call(ContextualSupplier<T,T> innerSupplier) |
Calls the innerSupplier synchronously, handling results according to the configured policies.
|
private <T> Call<T> |
FailsafeExecutor.callSync(ContextualSupplier<T,T> innerSupplier) |
Returns a Call that calls the innerSupplier synchronously, handling results according to the configured
policies.
|
<T extends R> T |
FailsafeExecutor.get(ContextualSupplier<T,T> supplier) |
Executes the supplier until a successful result is returned or the configured policies are exceeded.
|
(package private) static <R> java.util.function.Function<SyncExecutionImpl<R>,ExecutionResult<R>> |
Functions.get(ContextualSupplier<R,R> supplier,
java.util.concurrent.Executor executor) |
Returns a Supplier for synchronous executions that pre-executes the execution , applies the
supplier , records the result and returns the result.
|
<T extends R> java.util.concurrent.CompletableFuture<T> |
FailsafeExecutor.getAsync(ContextualSupplier<T,T> supplier) |
Executes the supplier asynchronously until a successful result is returned or the configured policies are
exceeded.
|
(package private) static <R> java.util.function.Function<AsyncExecutionInternal<R>,java.util.concurrent.CompletableFuture<ExecutionResult<R>>> |
Functions.getPromise(ContextualSupplier<R,R> supplier,
java.util.concurrent.Executor executor) |
Returns a Function for asynchronous executions that pre-executes the execution , applies the
supplier , records the result and returns a promise containing the result.
|
(package private) static <R> java.util.function.Function<AsyncExecutionInternal<R>,java.util.concurrent.CompletableFuture<ExecutionResult<R>>> |
Functions.getPromiseOfStage(ContextualSupplier<R,? extends java.util.concurrent.CompletionStage<? extends R>> supplier,
FailsafeFuture<R> future,
java.util.concurrent.Executor executor) |
Returns a Function that for asynchronous executions that pre-executes the execution , applies the
supplier , records the result and returns a promise containing the result.
|
<T extends R> java.util.concurrent.CompletableFuture<T> |
FailsafeExecutor.getStageAsync(ContextualSupplier<T,? extends java.util.concurrent.CompletionStage<T>> supplier) |
Executes the supplier asynchronously until the resulting future is successfully completed or the configured
policies are exceeded.
|
<T extends R> Call<T> |
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,java.time.Duration> delayFunction) |
Sets the delayFunction that computes the next delay before allowing another execution.
|
<F extends java.lang.Throwable> S |
DelayablePolicyBuilder.withDelayFnOn(ContextualSupplier<R,java.time.Duration> delayFunction,
java.lang.Class<F> exception) |
Sets the delayFunction that computes the next delay before allowing another execution.
|
S |
DelayablePolicyBuilder.withDelayFnWhen(ContextualSupplier<R,java.time.Duration> delayFunction,
R result) |
Sets the delayFunction that computes the next delay before allowing another execution.
|
(package private) static <R,T> ContextualSupplier<R,T> |
Functions.withExecutor(ContextualSupplier<R,T> supplier,
java.util.concurrent.Executor executor) |
|