Class RetryHelper (2.8.6)

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
NameDescription
callableCallable<V>
pollSettingsRetrySettings
resultPollAlgorithmResultRetryAlgorithm<V>
clockApiClock
Returns
TypeDescription
V
Exceptions
TypeDescription
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
NameDescription
callableCallable<V>
retrySettingsRetrySettings
resultRetryAlgorithmResultRetryAlgorithm<?>
clockApiClock
Returns
TypeDescription
V
Exceptions
TypeDescription
RetryHelper.RetryHelperException

Constructors

RetryHelper()

public RetryHelper()