Package com.google.cloud
Class RetryHelper
java.lang.Object
com.google.cloud.RetryHelper
Utility class for retrying operations. For more details about the parameters, see
RetrySettings. In case if retrying is unsuccessful, RetryHelper.RetryHelperException will be thrown.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <V> Vpoll(Callable<V> callable, RetrySettings pollSettings, ResultRetryAlgorithm<V> resultPollAlgorithm, ApiClock clock) static <V> VrunWithRetries(Callable<V> callable, RetrySettings retrySettings, ResultRetryAlgorithm<?> resultRetryAlgorithm, ApiClock clock)
-
Constructor Details
-
RetryHelper
public RetryHelper()
-
-
Method Details
-
runWithRetries
public static <V> V runWithRetries(Callable<V> callable, RetrySettings retrySettings, ResultRetryAlgorithm<?> resultRetryAlgorithm, ApiClock clock) throws RetryHelper.RetryHelperException - Throws:
RetryHelper.RetryHelperException
-
poll
public static <V> V poll(Callable<V> callable, RetrySettings pollSettings, ResultRetryAlgorithm<V> resultPollAlgorithm, ApiClock clock) throws ExecutionException, InterruptedException
-