@Internal public abstract class RetryCallableManager extends java.lang.Object implements java.io.Serializable
This class provides a way to retry a callable if it throws an exception. The retry behavior is
configurable using RetrySettings
.
This class is internal and should not be used directly.
Modifier and Type | Class and Description |
---|---|
static class |
RetryCallableManager.Builder |
Constructor and Description |
---|
RetryCallableManager() |
Modifier and Type | Method and Description |
---|---|
static RetryCallableManager.Builder |
builder() |
static RetryCallableManager |
create()
Creates a new
RetryCallableManager with default retry settings. |
<V> V |
retryCallable(java.util.concurrent.Callable<V> callable,
java.util.Set<java.lang.Class<? extends java.lang.Exception>> exceptionsToIntercept)
Method that executes and repeats the execution of the callable argument, if it throws one of
the exceptions from the exceptionsToIntercept Set.
|
public static RetryCallableManager create()
RetryCallableManager
with default retry settings.public <V> V retryCallable(java.util.concurrent.Callable<V> callable, java.util.Set<java.lang.Class<? extends java.lang.Exception>> exceptionsToIntercept)
V
- The type of the callable's return value.callable
- The callable to execute.exceptionsToIntercept
- The set of exceptions to intercept.public static RetryCallableManager.Builder builder()