| Constructor and Description |
|---|
LinearRetry(Callable<T> task) |
LinearRetry(Callable<T> task,
int maxRetries) |
LinearRetry(Callable<T> task,
int maxRetries,
Duration retryDelay,
Duration retryTimeout) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRetry()
Check that another retry can be attempted.
|
T |
run()
Start attempting to run provided task.
|
public LinearRetry(Callable<T> task, int maxRetries, Duration retryDelay, Duration retryTimeout)
task - Callable that throws exception on errormaxRetries - Positive number of attempts to call task before raising exceptionretryDelay - Time between attemptsretryTimeout - Maximum task execution time after which it is considered failedpublic boolean canRetry()
RetrycanRetry in interface Retry<T>Retry.canRetry()Copyright © 2016–2018. All rights reserved.