Package org.apache.beam.sdk.io.solace
Class RetryCallableManager
java.lang.Object
org.apache.beam.sdk.io.solace.RetryCallableManager
- All Implemented Interfaces:
Serializable
A class that manages retrying of callables based on the exceptions they throw.
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.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RetryCallableManager.Builder
builder()
static RetryCallableManager
create()
Creates a newRetryCallableManager
with default retry settings.<V> V
retryCallable
(Callable<V> callable, Set<Class<? extends Exception>> exceptionsToIntercept) Method that executes and repeats the execution of the callable argument, if it throws one of the exceptions from the exceptionsToIntercept Set.
-
Constructor Details
-
RetryCallableManager
public RetryCallableManager()
-
-
Method Details
-
create
Creates a newRetryCallableManager
with default retry settings. -
retryCallable
public <V> V retryCallable(Callable<V> callable, Set<Class<? extends Exception>> exceptionsToIntercept) Method that executes and repeats the execution of the callable argument, if it throws one of the exceptions from the exceptionsToIntercept Set.- Type Parameters:
V
- The type of the callable's return value.- Parameters:
callable
- The callable to execute.exceptionsToIntercept
- The set of exceptions to intercept.- Returns:
- The return value of the callable.
-
builder
-