public final class RetryingScheduler
extends java.lang.Object
| Constructor and Description |
|---|
RetryingScheduler(java.util.concurrent.ScheduledExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
schedule(java.util.concurrent.Callable<?> task,
int numRetries,
int retryDelaySeconds) |
void |
schedule(java.util.concurrent.Callable<?> task,
int initialDelaySeconds,
int numRetries,
int retryDelaySeconds)
Schedule a task for execution.
|
public RetryingScheduler(java.util.concurrent.ScheduledExecutorService executor)
public void schedule(java.util.concurrent.Callable<?> task,
int numRetries,
int retryDelaySeconds)
public void schedule(java.util.concurrent.Callable<?> task,
int initialDelaySeconds,
int numRetries,
int retryDelaySeconds)
task - task to callinitialDelaySeconds - initial delay (seconds) before executing the tasknumRetries - number of times to retry taskretryDelaySeconds - delay (seconds) before retrying a failed task