| Package | Description |
|---|---|
| net.jodah.recurrent |
| Modifier and Type | Method and Description |
|---|---|
<T> RetryPolicy |
RetryPolicy.abortIf(BiPredicate<T,? extends Throwable> completionPredicate)
Specifies that retries should be aborted if the
completionPredicate matches the completion result. |
<T> RetryPolicy |
RetryPolicy.abortIf(Predicate<T> resultPredicate)
Specifies that retries should be aborted if the
resultPredicate matches the result. |
RetryPolicy |
RetryPolicy.abortOn(Class<? extends Throwable>... failures)
Specifies when retries should be aborted.
|
RetryPolicy |
RetryPolicy.abortOn(List<Class<? extends Throwable>> failures)
Specifies when retries should be aborted.
|
RetryPolicy |
RetryPolicy.abortOn(Predicate<? extends Throwable> failurePredicate)
Specifies that retries should be aborted if the
failurePredicate matches the failure. |
RetryPolicy |
RetryPolicy.abortWhen(Object result)
Specifies that retries should be aborted if the invocation result matches the
result. |
RetryPolicy |
RetryPolicy.copy()
Returns a copy of this RetryPolicy.
|
<T> RetryPolicy |
RetryPolicy.retryIf(BiPredicate<T,? extends Throwable> completionPredicate)
Specifies that a retry should occur if the
completionPredicate matches the completion result and the retry
policy is not exceeded. |
<T> RetryPolicy |
RetryPolicy.retryIf(Predicate<T> resultPredicate)
Specifies that a retry should occur if the
resultPredicate matches the result and the retry policy is not
exceeded. |
RetryPolicy |
RetryPolicy.retryOn(Class<? extends Throwable>... failures)
Specifies the failures to retry on.
|
RetryPolicy |
RetryPolicy.retryOn(List<Class<? extends Throwable>> failures)
Specifies the failures to retry on.
|
RetryPolicy |
RetryPolicy.retryOn(Predicate<? extends Throwable> failurePredicate)
Specifies that a retry should occur if the
failurePredicate matches the failure and the retry policy is not
exceeded. |
RetryPolicy |
RetryPolicy.retryWhen(Object result)
Specifies that a retry should occur if the invocation result matches the
result and the retry policy is not
exceeded. |
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(Callable<CompletableFuture<T>> callable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor,
AsyncListeners<T> listeners)
Invokes the
callable, scheduling retries with the executor according to the retryPolicy. |
static <T> CompletableFuture<T> |
Recurrent.future(Callable<CompletableFuture<T>> callable,
RetryPolicy retryPolicy,
Scheduler scheduler)
Invokes the
callable, scheduling retries with the scheduler according to the retryPolicy. |
static <T> CompletableFuture<T> |
Recurrent.future(Callable<CompletableFuture<T>> callable,
RetryPolicy retryPolicy,
Scheduler scheduler,
AsyncListeners<T> listeners)
Invokes the
callable, scheduling retries with the scheduler 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> CompletableFuture<T> |
Recurrent.future(ContextualCallable<CompletableFuture<T>> callable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor,
AsyncListeners<T> listeners)
Invokes the
callable, scheduling retries with the executor according to the retryPolicy. |
static <T> CompletableFuture<T> |
Recurrent.future(ContextualCallable<CompletableFuture<T>> callable,
RetryPolicy retryPolicy,
Scheduler scheduler)
Invokes the
callable, scheduling retries with the scheduler according to the retryPolicy. |
static <T> CompletableFuture<T> |
Recurrent.future(ContextualCallable<CompletableFuture<T>> callable,
RetryPolicy retryPolicy,
Scheduler scheduler,
AsyncListeners<T> listeners)
Invokes the
callable, scheduling retries with the scheduler 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> T |
Recurrent.get(Callable<T> callable,
RetryPolicy retryPolicy,
Listeners<T> listeners)
Invokes the
callable, sleeping between invocation attempts according to the retryPolicy, and
calling the listeners on recurrent events. |
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(Callable<T> callable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor,
AsyncListeners<T> listeners)
Invokes the
callable, scheduling retries with the executor according to the retryPolicy. |
static <T> RecurrentFuture<T> |
Recurrent.get(Callable<T> callable,
RetryPolicy retryPolicy,
Scheduler scheduler)
Invokes the
callable, scheduling retries with the scheduler according to the retryPolicy. |
static <T> RecurrentFuture<T> |
Recurrent.get(Callable<T> callable,
RetryPolicy retryPolicy,
Scheduler scheduler,
AsyncListeners<T> listeners)
Invokes the
callable, scheduling retries with the scheduler 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 <T> RecurrentFuture<T> |
Recurrent.get(ContextualCallable<T> callable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor,
AsyncListeners<T> listeners)
Invokes the
callable, scheduling retries with the executor according to the retryPolicy. |
static <T> RecurrentFuture<T> |
Recurrent.get(ContextualCallable<T> callable,
RetryPolicy retryPolicy,
Scheduler scheduler)
Invokes the
callable, scheduling retries with the scheduler according to the retryPolicy. |
static <T> RecurrentFuture<T> |
Recurrent.get(ContextualCallable<T> callable,
RetryPolicy retryPolicy,
Scheduler scheduler,
AsyncListeners<T> listeners)
Invokes the
callable, scheduling retries with the scheduler according to the retryPolicy. |
static void |
Recurrent.run(CheckedRunnable runnable,
RetryPolicy retryPolicy)
Invokes the
runnable, sleeping between invocation attempts according to the retryPolicy. |
static void |
Recurrent.run(CheckedRunnable runnable,
RetryPolicy retryPolicy,
Listeners<?> listeners)
Invokes the
runnable, sleeping between invocation attempts according to the retryPolicy, and
calling the listeners on recurrent events. |
static RecurrentFuture<?> |
Recurrent.run(CheckedRunnable runnable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor)
Invokes the
runnable, scheduling retries with the executor according to the retryPolicy. |
static <T> RecurrentFuture<T> |
Recurrent.run(CheckedRunnable runnable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor,
AsyncListeners<T> listeners)
Invokes the
runnable, scheduling retries with the executor according to the retryPolicy. |
static RecurrentFuture<?> |
Recurrent.run(CheckedRunnable runnable,
RetryPolicy retryPolicy,
Scheduler scheduler)
Invokes the
runnable, scheduling retries with the scheduler according to the retryPolicy. |
static <T> RecurrentFuture<T> |
Recurrent.run(CheckedRunnable runnable,
RetryPolicy retryPolicy,
Scheduler scheduler,
AsyncListeners<T> listeners)
Invokes the
runnable, scheduling retries with the scheduler 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 <T> RecurrentFuture<T> |
Recurrent.run(ContextualRunnable runnable,
RetryPolicy retryPolicy,
ScheduledExecutorService executor,
AsyncListeners<T> listeners)
Invokes the
runnable, scheduling retries with the executor according to the retryPolicy. |
static RecurrentFuture<?> |
Recurrent.run(ContextualRunnable runnable,
RetryPolicy retryPolicy,
Scheduler scheduler)
Invokes the
runnable, scheduling retries with the scheduler according to the retryPolicy. |
static <T> RecurrentFuture<T> |
Recurrent.run(ContextualRunnable runnable,
RetryPolicy retryPolicy,
Scheduler scheduler,
AsyncListeners<T> listeners)
Invokes the
runnable, scheduling retries with the scheduler according to the retryPolicy. |
| Constructor and Description |
|---|
Invocation(RetryPolicy retryPolicy)
Creates a new Invocation for the
retryPolicy. |
RetryPolicy(RetryPolicy rp)
Copy constructor.
|
Copyright © 2016. All Rights Reserved.