public class AsyncRecurrent extends Object
RetryPolicy.| Modifier and Type | Method and Description |
|---|---|
<T> CompletableFuture<T> |
future(Callable<CompletableFuture<T>> callable)
Executes the
callable asynchronously until the resulting future is successfully completed or the configured
RetryPolicy is exceeded. |
<T> CompletableFuture<T> |
future(ContextualCallable<CompletableFuture<T>> callable)
Executes the
callable asynchronously until the resulting future is successfully completed or the configured
RetryPolicy is exceeded. |
<T> CompletableFuture<T> |
futureAsync(AsyncCallable<CompletableFuture<T>> callable)
Executes the
callable asynchronously until the resulting future is successfully completed or the configured
RetryPolicy is exceeded. |
<T> RecurrentFuture<T> |
get(Callable<T> callable)
Executes the
callable asynchronously until a successful result is returned or the configured
RetryPolicy is exceeded. |
<T> RecurrentFuture<T> |
get(ContextualCallable<T> callable)
Executes the
callable asynchronously until a successful result is returned or the configured
RetryPolicy is exceeded. |
<T> RecurrentFuture<T> |
getAsync(AsyncCallable<T> callable)
Executes the
callable asynchronously until a successful result is returned or the configured
RetryPolicy is exceeded. |
RecurrentFuture<Void> |
run(CheckedRunnable runnable)
Executes the
runnable asynchronously until successful or until the configured RetryPolicy is
exceeded. |
RecurrentFuture<Void> |
run(ContextualRunnable runnable)
Executes the
runnable asynchronously until successful or until the configured RetryPolicy is
exceeded. |
RecurrentFuture<Void> |
runAsync(AsyncRunnable runnable)
Executes the
runnable asynchronously until successful or until the configured RetryPolicy is
exceeded. |
<T extends Listeners<?>> |
with(T listeners)
Configures the
listeners to be called as execution events occur. |
public <T> RecurrentFuture<T> get(Callable<T> callable)
callable asynchronously until a successful result is returned or the configured
RetryPolicy is exceeded.NullPointerException - if the callable is nullpublic <T> RecurrentFuture<T> get(ContextualCallable<T> callable)
callable asynchronously until a successful result is returned or the configured
RetryPolicy is exceeded.NullPointerException - if the callable is nullpublic <T> RecurrentFuture<T> getAsync(AsyncCallable<T> callable)
callable asynchronously until a successful result is returned or the configured
RetryPolicy is exceeded. This method is intended for integration with asynchronous code. Retries must be
manually scheduled via one of the AsyncExecution.retry methods.NullPointerException - if the callable is nullpublic RecurrentFuture<Void> run(CheckedRunnable runnable)
runnable asynchronously until successful or until the configured RetryPolicy is
exceeded.NullPointerException - if the runnable is nullpublic RecurrentFuture<Void> run(ContextualRunnable runnable)
runnable asynchronously until successful or until the configured RetryPolicy is
exceeded.NullPointerException - if the runnable is nullpublic RecurrentFuture<Void> runAsync(AsyncRunnable runnable)
runnable asynchronously until successful or until the configured RetryPolicy is
exceeded. This method is intended for integration with asynchronous code. Retries must be manually scheduled via
one of the AsyncExecution.retry methods.NullPointerException - if the runnable is nullpublic <T> CompletableFuture<T> future(Callable<CompletableFuture<T>> callable)
callable asynchronously until the resulting future is successfully completed or the configured
RetryPolicy is exceeded.
Supported on Java 8 and above.
NullPointerException - if the callable is nullpublic <T> CompletableFuture<T> future(ContextualCallable<CompletableFuture<T>> callable)
callable asynchronously until the resulting future is successfully completed or the configured
RetryPolicy is exceeded.
Supported on Java 8 and above.
NullPointerException - if the callable is nullpublic <T> CompletableFuture<T> futureAsync(AsyncCallable<CompletableFuture<T>> callable)
callable asynchronously until the resulting future is successfully completed or the configured
RetryPolicy is exceeded. This method is intended for integration with asynchronous code. Retries must be
manually scheduled via one of the AsyncExecution.retry methods.
Supported on Java 8 and above.
NullPointerException - if the callable is nullpublic <T extends Listeners<?>> AsyncRecurrent with(T listeners)
listeners to be called as execution events occur.Copyright © 2016. All Rights Reserved.