public class RetryTask extends Object implements Runnable
| Constructor and Description |
|---|
RetryTask(Runnable task,
int tries)
An instance that does nothing before retrying and ignores exceptions that
occur.
|
RetryTask(Runnable task,
int tries,
ExceptionHandler handler)
An instance that does nothing before retrying.
|
RetryTask(Runnable task,
int tries,
ExceptionHandler handler,
Runnable beforeRetry)
Constructor for RetryTask.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run()
Attempt to run the wrapped Runnable tries number of times.
|
public RetryTask(Runnable task, int tries)
task - to run, must not be nulltries - number of times to attempt to run task, must be posititvepublic RetryTask(Runnable task, int tries, ExceptionHandler handler)
task - to run, must not be nulltries - number of times to attempt to run task, must be positivehandler - reacts to exceptions thrown by the wrapped task, must not be
nullpublic RetryTask(Runnable task, int tries, ExceptionHandler handler, Runnable beforeRetry)
Constructor for RetryTask.
task - to run, must not be nulltries - number of times to attempt to run task, must be positivehandler - reacts to exceptions thrown by the wrapped task, must not be
nullbeforeRetry - runs before each retry, must not be nullCopyright © 2018 Atlassian. All rights reserved.