Package com.google.cloud
Class RetryHelper
- java.lang.Object
-
- com.google.cloud.RetryHelper
-
@BetaApi public class RetryHelper extends Object
Utility class for retrying operations. For more details about the parameters, seeRetrySettings
. In case if retrying is unsuccessful,RetryHelper.RetryHelperException
will be thrown.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RetryHelper.RetryHelperException
-
Constructor Summary
Constructors Constructor Description RetryHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> V
poll(Callable<V> callable, com.google.api.gax.retrying.RetrySettings pollSettings, com.google.api.gax.retrying.ResultRetryAlgorithm<V> resultPollAlgorithm, com.google.api.core.ApiClock clock)
static <V> V
runWithRetries(Callable<V> callable, com.google.api.gax.retrying.RetrySettings retrySettings, com.google.api.gax.retrying.ResultRetryAlgorithm<?> resultRetryAlgorithm, com.google.api.core.ApiClock clock)
-
-
-
Method Detail
-
runWithRetries
public static <V> V runWithRetries(Callable<V> callable, com.google.api.gax.retrying.RetrySettings retrySettings, com.google.api.gax.retrying.ResultRetryAlgorithm<?> resultRetryAlgorithm, com.google.api.core.ApiClock clock) throws RetryHelper.RetryHelperException
- Throws:
RetryHelper.RetryHelperException
-
poll
public static <V> V poll(Callable<V> callable, com.google.api.gax.retrying.RetrySettings pollSettings, com.google.api.gax.retrying.ResultRetryAlgorithm<V> resultPollAlgorithm, com.google.api.core.ApiClock clock) throws ExecutionException, InterruptedException
-
-