Class RetryHelper (2.39.0)

Beta

This library is covered by thePre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see thelaunch stage descriptions.

publicclassRetryHelper

Utility class for retrying operations. For more details about the parameters, seeRetrySettings. 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)

publicstaticV<V>poll(Callable<V>callable,RetrySettingspollSettings,ResultRetryAlgorithm<V>resultPollAlgorithm,ApiClockclock)
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)

publicstaticV<V>runWithRetries(Callable<V>callable,RetrySettingsretrySettings,ResultRetryAlgorithm<?>resultRetryAlgorithm,ApiClockclock)
Parameters
NameDescription
callableCallable<V>
retrySettingsRetrySettings
resultRetryAlgorithmResultRetryAlgorithm<?>
clockApiClock
Returns
TypeDescription
V
Exceptions
TypeDescription
RetryHelper.RetryHelperException

Constructors

RetryHelper()

publicRetryHelper()

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-31 UTC.