public class SyncRecurrent extends Object
RetryPolicy.| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(Callable<T> callable)
Executes the
callable until a successful result is returned or the configured RetryPolicy is
exceeded. |
<T> T |
get(ContextualCallable<T> callable)
Executes the
callable until a successful result is returned or the configured RetryPolicy is
exceeded. |
void |
run(CheckedRunnable runnable)
Executes the
runnable until successful or until the configured RetryPolicy is exceeded. |
void |
run(ContextualRunnable runnable)
Executes the
runnable until successful or until the configured RetryPolicy is exceeded. |
SyncRecurrent |
with(Listeners<?> listeners)
Configures the
listeners to be called as execution events occur. |
public <T> T get(Callable<T> callable)
callable until a successful result is returned or the configured RetryPolicy is
exceeded.NullPointerException - if the callable is nullRecurrentException - if the callable fails with a Throwable and the retry policy is exceeded, or if
interrupted while waiting to perform a retry.public <T> T get(ContextualCallable<T> callable)
callable until a successful result is returned or the configured RetryPolicy is
exceeded.NullPointerException - if the callable is nullRecurrentException - if the callable fails with a Throwable and the retry policy is exceeded, or if
interrupted while waiting to perform a retry.public void run(CheckedRunnable runnable)
runnable until successful or until the configured RetryPolicy is exceeded.NullPointerException - if the runnable is nullRecurrentException - if the callable fails with a Throwable and the retry policy is exceeded, or if
interrupted while waiting to perform a retry.public void run(ContextualRunnable runnable)
runnable until successful or until the configured RetryPolicy is exceeded.NullPointerException - if the runnable is nullRecurrentException - if the callable fails with a Throwable and the retry policy is exceeded, or if
interrupted while waiting to perform a retry.public SyncRecurrent with(Listeners<?> listeners)
listeners to be called as execution events occur.Copyright © 2016. All Rights Reserved.