| Package | Description |
|---|---|
| net.jodah.recurrent |
| Modifier and Type | Class and Description |
|---|---|
class |
AsyncListeners<T>
Recurrent event listeners that are called asynchronously on the
Scheduler or ScheduledExecutorService
associated with the Recurrent call. |
| Modifier and Type | Method and Description |
|---|---|
<L extends Listeners<T>> |
Listeners.whenComplete(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when an invocation is completed. |
<L extends Listeners<T>> |
Listeners.whenComplete(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when an invocation is completed. |
<L extends Listeners<T>> |
Listeners.whenFailedAttempt(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after a failed invocation attempt. |
<L extends Listeners<T>> |
Listeners.whenFailedAttempt(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after a failed invocation attempt. |
<L extends Listeners<T>> |
Listeners.whenFailure(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after an invocation attempt fails. |
<L extends Listeners<T>> |
Listeners.whenFailure(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when the retry policy is exceeded and the result is a failure. |
<L extends Listeners<T>> |
Listeners.whenRetry(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when the retry policy is exceeded and the result is a failure. |
<L extends Listeners<T>> |
Listeners.whenRetry(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called before a retry is attempted. |
<L extends Listeners<T>> |
Listeners.whenSuccess(ContextualSuccessListener<? super T> listener)
Registers the
listener to be called after a successful invocation. |
| Modifier and Type | Method and Description |
|---|---|
Listeners<T> |
Listeners.whenSuccess(SuccessListener<? super T> listener)
Registers the
listener to be called after a successful invocation. |
| Modifier and Type | Method and Description |
|---|---|
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 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. |
Copyright © 2016. All Rights Reserved.