| 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 SyncRecurrent |
Recurrent.with(RetryPolicy retryPolicy)
Creates and returns a new Recurrent instance that will perform invocations and retries synchronously according to
the
retryPolicy. |
static AsyncRecurrent |
Recurrent.with(RetryPolicy retryPolicy,
ScheduledExecutorService executor)
Creates and returns a new Recurrent instance that will perform invocations and retries asynchronously via the
executor according to the retryPolicy. |
static AsyncRecurrent |
Recurrent.with(RetryPolicy retryPolicy,
Scheduler scheduler)
Creates and returns a new Recurrent instance that will perform invocations and retries asynchronously via 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.