Class RetryHelper (2.49.0)

public class RetryHelper

Utility class for retrying operations. For more details about the parameters, see RetrySettings. In case if retrying is unsuccessful, RetryHelperException will be thrown.

Inheritance

java.lang.Object > RetryHelper

Static Methods

<V>poll(Callable<V> callable, RetrySettings pollSettings, ResultRetryAlgorithm<V> resultPollAlgorithm, ApiClock clock)

public static V <V>poll(Callable<V> callable, RetrySettings pollSettings, ResultRetryAlgorithm<V> resultPollAlgorithm, ApiClock clock)
Parameters
Name Description
callable Callable<V>
pollSettings RetrySettings
resultPollAlgorithm ResultRetryAlgorithm<V>
clock ApiClock
Returns
Type Description
V
Exceptions
Type Description
ExecutionException
InterruptedException

<V>runWithRetries(Callable<V> callable, RetrySettings retrySettings, ResultRetryAlgorithm<?> resultRetryAlgorithm, ApiClock clock)

public static V <V>runWithRetries(Callable<V> callable, RetrySettings retrySettings, ResultRetryAlgorithm<?> resultRetryAlgorithm, ApiClock clock)
Parameters
Name Description
callable Callable<V>
retrySettings RetrySettings
resultRetryAlgorithm ResultRetryAlgorithm<?>
clock ApiClock
Returns
Type Description
V
Exceptions
Type Description
RetryHelper.RetryHelperException

Constructors

RetryHelper()

public RetryHelper()