public class RetryPolicy<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
RetryPolicy.PositiveVerdict |
static interface |
RetryPolicy.Verdict |
| Modifier and Type | Field and Description |
|---|---|
static Predicate<Object> |
ACCEPT_NULL_RESULT |
static RetryPolicy<Object> |
DEFAULT |
protected static RetryPolicy.Verdict |
DONT_RETRY |
static Predicate<Object> |
IGNORE_RESULT |
static Predicate<Object> |
REJECT_NULL_RESULT |
| Constructor and Description |
|---|
RetryPolicy() |
RetryPolicy(int maxRetries,
DelayPolicy<? super T> backoff) |
RetryPolicy(int maxRetries,
DelayPolicy<? super T> backoff,
DelayPolicy<? super T> timeout) |
RetryPolicy(int maxRetries,
long backoff) |
RetryPolicy(int maxRetries,
long backoff,
long timeout) |
RetryPolicy(int maxRetries,
Predicate<? super T> resultValidator,
DelayPolicy<? super T> backoff) |
RetryPolicy(int maxRetries,
Predicate<? super T> resultValidator,
DelayPolicy<? super T> backoff,
DelayPolicy<? super T> timeout) |
RetryPolicy(int maxRetries,
Predicate<? super T> resultValidator,
long backoff) |
RetryPolicy(int maxRetries,
Predicate<? super T> resultValidator,
long backoff,
long timeout) |
RetryPolicy(int maxRetries,
Predicate<? super T> resultValidator,
Set<Class<? extends Throwable>> retryOn,
Set<Class<? extends Throwable>> abortOn,
Predicate<RetryContext<? extends T>> retryPredicate,
Predicate<RetryContext<? extends T>> abortPredicate,
DelayPolicy<? super T> backoff,
DelayPolicy<? super T> timeout) |
RetryPolicy(long backoff) |
RetryPolicy(Predicate<? super T> resultValidator) |
RetryPolicy(Predicate<? super T> resultValidator,
long backoff) |
protected static final RetryPolicy.Verdict DONT_RETRY
public static final RetryPolicy<Object> DEFAULT
public RetryPolicy(int maxRetries,
Predicate<? super T> resultValidator,
Set<Class<? extends Throwable>> retryOn,
Set<Class<? extends Throwable>> abortOn,
Predicate<RetryContext<? extends T>> retryPredicate,
Predicate<RetryContext<? extends T>> abortPredicate,
DelayPolicy<? super T> backoff,
DelayPolicy<? super T> timeout)
public RetryPolicy()
public RetryPolicy(long backoff)
public RetryPolicy(int maxRetries,
long backoff)
public RetryPolicy(int maxRetries,
long backoff,
long timeout)
public RetryPolicy(int maxRetries,
Predicate<? super T> resultValidator,
long backoff,
long timeout)
public RetryPolicy(int maxRetries,
DelayPolicy<? super T> backoff)
public RetryPolicy(int maxRetries,
Predicate<? super T> resultValidator,
DelayPolicy<? super T> backoff)
public RetryPolicy(int maxRetries,
DelayPolicy<? super T> backoff,
DelayPolicy<? super T> timeout)
public RetryPolicy(int maxRetries,
Predicate<? super T> resultValidator,
DelayPolicy<? super T> backoff,
DelayPolicy<? super T> timeout)
@SafeVarargs public final RetryPolicy<T> retryOn(Class<? extends Throwable>... retryOnThrowables)
public RetryPolicy<T> retryOn(Collection<Class<? extends Throwable>> retryOnThrowables)
@SafeVarargs public final RetryPolicy<T> abortOn(Class<? extends Throwable>... abortOnThrowables)
public RetryPolicy<T> abortOn(Collection<Class<? extends Throwable>> abortOnThrowables)
public RetryPolicy<T> abortIf(Predicate<RetryContext<? extends T>> abortPredicate)
public RetryPolicy<T> retryIf(Predicate<RetryContext<? extends T>> retryPredicate)
public RetryPolicy<T> withoutAbortRules()
public RetryPolicy<T> withoutRetryRules()
public RetryPolicy<T> retryOnce()
public RetryPolicy<T> retryInfinitely()
public RetryPolicy<T> withMaxRetries(int maxRetries)
public RetryPolicy<T> acceptNullResult()
public RetryPolicy<T> rejectNullResult()
public RetryPolicy<T> withResultValidator(Predicate<? super T> resultValidator)
public RetryPolicy<T> withBackoff(DelayPolicy<? super T> backoff)
public RetryPolicy<T> withoutBackoff()
public RetryPolicy<T> withTimeout(DelayPolicy<? super T> timeout)
public RetryPolicy<T> withoutTimeout()
protected boolean acceptResult(T result)
protected RetryPolicy.Verdict shouldContinue(RetryContext<? extends T> context)
protected boolean exceptionClassRetryable(RetryContext<?> context)
Copyright © 2021. All rights reserved.