| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_ATTEMPTS
The default limit to the number of attempts for a new policy.
|
| Constructor and Description |
|---|
SimpleRetry() |
SimpleRetry(int maxAttempts) |
SimpleRetry(int maxAttempts,
long sleepMillis) |
| Modifier and Type | Method and Description |
|---|---|
<T,E extends Throwable> |
execute(RetryCallback<T,E> retryCallback)
Execute the supplied
CheckedCallable with the configured retry semantics. |
int |
getMaxAttempts() |
long |
getSleepMillis() |
public static final int DEFAULT_MAX_ATTEMPTS
public SimpleRetry()
public SimpleRetry(int maxAttempts)
public SimpleRetry(int maxAttempts,
long sleepMillis)
public int getMaxAttempts()
public long getSleepMillis()
public <T,E extends Throwable> T execute(RetryCallback<T,E> retryCallback) throws E extends Throwable
IRetryCheckedCallable with the configured retry semantics. See
implementations for configuration details.execute in interface IRetryT - the return valueE - the exception thrownretryCallback - the CheckedCallableE - the exception thrownE extends ThrowableCopyright © 2024. All rights reserved.