V - return value of the closure that is being run with retriespublic class RetryHelper<V> extends Object
RetryParams. If the request is never successful, a RetryHelper.RetriesExhaustedException will
be thrown.| Modifier and Type | Class and Description |
|---|---|
static class |
RetryHelper.NonRetriableException
Thrown when RetryHelper callable has indicate it should not be retried.
|
static class |
RetryHelper.RetriesExhaustedException
Thrown when a RetryHelper has attempted the maximum number of attempts allowed by RetryParams
and was not successful.
|
static class |
RetryHelper.RetryHelperException |
static class |
RetryHelper.RetryInterruptedException
Thrown when a RetryHelper failed to complete its work due to interruption.
|
| Modifier and Type | Method and Description |
|---|---|
static <V> V |
runWithRetries(Callable<V> callable) |
static <V> V |
runWithRetries(Callable<V> callable,
RetryParams params,
ExceptionHandler exceptionHandler) |
static <V> V |
runWithRetries(Callable<V> callable,
RetryParams params,
ExceptionHandler exceptionHandler,
Clock clock) |
String |
toString() |
public static <V> V runWithRetries(Callable<V> callable) throws RetryHelper.RetryHelperException
RetryHelper.RetryHelperExceptionpublic static <V> V runWithRetries(Callable<V> callable, RetryParams params, ExceptionHandler exceptionHandler) throws RetryHelper.RetryHelperException
RetryHelper.RetryHelperExceptionpublic static <V> V runWithRetries(Callable<V> callable, RetryParams params, ExceptionHandler exceptionHandler, Clock clock) throws RetryHelper.RetryHelperException
RetryHelper.RetryHelperExceptionCopyright © 2016 Google. All rights reserved.