Package com.google.gerrit.server.update
Class RetryHelper
- java.lang.Object
-
- com.google.gerrit.server.update.RetryHelper
-
public class RetryHelper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RetryHelper.Action<T>
static class
RetryHelper.Options
Options for retrying a single operation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RetryHelper.Options
defaults()
<T> T
execute(RetryHelper.Action<T> action)
<T> T
execute(RetryHelper.Action<T> action, RetryHelper.Options opts)
Duration
getDefaultTimeout()
static RetryHelper.Options.Builder
options()
-
-
-
Method Detail
-
options
public static RetryHelper.Options.Builder options()
-
defaults
public static RetryHelper.Options defaults()
-
getDefaultTimeout
public Duration getDefaultTimeout()
-
execute
public <T> T execute(RetryHelper.Action<T> action) throws RestApiException, UpdateException
- Throws:
RestApiException
UpdateException
-
execute
public <T> T execute(RetryHelper.Action<T> action, RetryHelper.Options opts) throws RestApiException, UpdateException
- Throws:
RestApiException
UpdateException
-
-