| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRetryable()
Initializes a new instance of the class.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
attempt()
Attempt to execute the task, once.
|
void |
execute(long interval,
long timeout)
Executes the task without a starting delay.
|
void |
execute(long delay,
long interval,
long timeout)
Executes the task without a starting delay.
|
protected AbstractRetryable()
protected abstract void attempt()
throws TemporaryException,
T extends Throwable
TemporaryException - For an error condition that can be temporary - i.e. retrying later
could be successfulT - For all other error conditionsT extends Throwablepublic void execute(long interval,
long timeout)
throws RetryTimeoutException,
T extends Throwable
interval - The interval between each task execution attempt.timeout - The timeout after which we won't try again to execute the task.RetryTimeoutException - If this Retryable fails to complete its task in the given time.T - For all other error conditions.T extends Throwablepublic void execute(long delay,
long interval,
long timeout)
throws RetryTimeoutException,
T extends Throwable
delay - An initial delay to wait for before the first attempt.interval - The interval between each task execution attempt.timeout - The timeout after which we won't try again to execute the task.RetryTimeoutException - If this Retryable fails to complete its task in the given time.T - For all other error conditions.T extends ThrowableCopyright © 2016 - present; JODConverter.org. All rights reserved.