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.RetryHelperExceptionwill be thrown.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRetryHelper.RetryHelperException
-
Constructor Summary
Constructors Constructor Description RetryHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> Vpoll(Callable<V> callable, RetrySettings pollSettings, ResultRetryAlgorithm<V> resultPollAlgorithm, ApiClock clock)static <V> VrunWithRetries(Callable<V> callable, RetrySettings retrySettings, ResultRetryAlgorithm<?> resultRetryAlgorithm, ApiClock clock)
-
-
-
Method Detail
-
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
-
-