| Package | Description |
|---|---|
| net.jodah.recurrent |
| Modifier and Type | Method and Description |
|---|---|
RetryPolicy |
RetryPolicy.retryOn(Class<? extends Throwable>... failures)
Specifies the failures to retry on.
|
RetryPolicy |
RetryPolicy.retryWhen(Predicate<Throwable> retryPredicate)
Specifies when a retry should occur for a particular failure.
|
RetryPolicy |
RetryPolicy.withBackoff(long delay,
long maxDelay,
TimeUnit timeUnit)
Sets the
delay between retries, exponentially backing of to the maxDelay and multiplying successive
delays by a factor of 2. |
RetryPolicy |
RetryPolicy.withBackoff(long delay,
long maxDelay,
TimeUnit timeUnit,
double delayMultiplier)
Sets the
delay between retries, exponentially backing of to the maxDelay and multiplying successive
delays by the delayMultiplier. |
RetryPolicy |
RetryPolicy.withDelay(long delay,
TimeUnit timeUnit)
Sets the
delay between retries. |
RetryPolicy |
RetryPolicy.withMaxDuration(long maxDuration,
TimeUnit timeUnit)
Sets the max duration to perform retries for.
|
RetryPolicy |
RetryPolicy.withMaxRetries(int maxRetries)
Sets the max number of retries to perform.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> CompletableFuture<T> |
Recurrent.future(Callable<CompletableFuture<T>> callable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor)
Invokes the
callable, scheduling retries with the executor according to the retryPolicy. |
static <T> CompletableFuture<T> |
Recurrent.future(ContextualCallable<CompletableFuture<T>> callable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor)
Invokes the
callable, scheduling retries with the executor according to the retryPolicy. |
static <T> T |
Recurrent.get(Callable<T> callable,
RetryPolicy retryPolicy)
Invokes the
callable, sleeping between invocation attempts according to the retryPolicy. |
static <T> RecurrentFuture<T> |
Recurrent.get(Callable<T> callable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor)
Invokes the
callable, scheduling retries with the executor according to the retryPolicy. |
static <T> RecurrentFuture<T> |
Recurrent.get(ContextualCallable<T> callable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor)
Invokes the
callable, scheduling retries with the executor according to the retryPolicy. |
static RecurrentFuture<?> |
Recurrent.run(ContextualRunnable runnable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor)
Invokes the
runnable, scheduling retries with the executor according to the retryPolicy. |
static void |
Recurrent.run(Runnable runnable,
RetryPolicy retryPolicy)
Invokes the
runnable, sleeping between invocation attempts according to the retryPolicy. |
static RecurrentFuture<?> |
Recurrent.run(Runnable runnable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor)
Invokes the
runnable, scheduling retries with the executor according to the retryPolicy. |
Copyright © 2015. All Rights Reserved.