public class RetryHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
RetryHelper.Action<T> |
static class |
RetryHelper.ActionType |
static interface |
RetryHelper.ChangeAction<T> |
static class |
RetryHelper.Metrics |
static class |
RetryHelper.Options
Options for retrying a single operation.
|
Constructor and Description |
---|
RetryHelper(org.eclipse.jgit.lib.Config cfg,
RetryHelper.Metrics metrics,
NotesMigration migration,
ReviewDbBatchUpdate.AssistedFactory reviewDbBatchUpdateFactory,
NoteDbBatchUpdate.AssistedFactory noteDbBatchUpdateFactory,
java.util.function.Consumer<com.github.rholder.retry.RetryerBuilder<?>> overwriteDefaultRetryerStrategySetup) |
Modifier and Type | Method and Description |
---|---|
<T> T |
execute(RetryHelper.ActionType actionType,
RetryHelper.Action<T> action,
com.google.common.base.Predicate<java.lang.Throwable> exceptionPredicate) |
<T> T |
execute(RetryHelper.ActionType actionType,
RetryHelper.Action<T> action,
RetryHelper.Options opts,
com.google.common.base.Predicate<java.lang.Throwable> exceptionPredicate) |
<T> T |
execute(RetryHelper.ChangeAction<T> changeAction) |
<T> T |
execute(RetryHelper.ChangeAction<T> changeAction,
RetryHelper.Options opts) |
java.time.Duration |
getDefaultTimeout(RetryHelper.ActionType actionType) |
static RetryHelper.Options.Builder |
options() |
public RetryHelper(org.eclipse.jgit.lib.Config cfg, RetryHelper.Metrics metrics, NotesMigration migration, ReviewDbBatchUpdate.AssistedFactory reviewDbBatchUpdateFactory, NoteDbBatchUpdate.AssistedFactory noteDbBatchUpdateFactory, java.util.function.Consumer<com.github.rholder.retry.RetryerBuilder<?>> overwriteDefaultRetryerStrategySetup)
public static RetryHelper.Options.Builder options()
public java.time.Duration getDefaultTimeout(RetryHelper.ActionType actionType)
public <T> T execute(RetryHelper.ActionType actionType, RetryHelper.Action<T> action, com.google.common.base.Predicate<java.lang.Throwable> exceptionPredicate) throws java.lang.Exception
java.lang.Exception
public <T> T execute(RetryHelper.ActionType actionType, RetryHelper.Action<T> action, RetryHelper.Options opts, com.google.common.base.Predicate<java.lang.Throwable> exceptionPredicate) throws java.lang.Exception
java.lang.Exception
public <T> T execute(RetryHelper.ChangeAction<T> changeAction) throws RestApiException, UpdateException
RestApiException
UpdateException
public <T> T execute(RetryHelper.ChangeAction<T> changeAction, RetryHelper.Options opts) throws RestApiException, UpdateException
RestApiException
UpdateException