public class RetryPolicy extends Object
| Modifier and Type | Field and Description |
|---|---|
static RetryPolicy |
DEFAULT |
| Constructor and Description |
|---|
RetryPolicy() |
RetryPolicy(int maxRetries,
Set<Class<? extends Throwable>> retryOn,
Set<Class<? extends Throwable>> abortOn,
com.google.common.base.Predicate<Throwable> retryPredicate,
com.google.common.base.Predicate<Throwable> abortPredicate) |
| Modifier and Type | Method and Description |
|---|---|
RetryPolicy |
abortIf(com.google.common.base.Predicate<Throwable> abortPredicate) |
RetryPolicy |
abortOn(Class<? extends Throwable>... abortOnThrowables) |
RetryPolicy |
dontRetry() |
RetryPolicy |
retryIf(com.google.common.base.Predicate<Throwable> retryPredicate) |
RetryPolicy |
retryOn(Class<? extends Throwable>... retryOnThrowables) |
boolean |
shouldContinue(RetryContext context) |
RetryPolicy |
withMaxRetries(int times) |
public static final RetryPolicy DEFAULT
public RetryPolicy(int maxRetries,
Set<Class<? extends Throwable>> retryOn,
Set<Class<? extends Throwable>> abortOn,
com.google.common.base.Predicate<Throwable> retryPredicate,
com.google.common.base.Predicate<Throwable> abortPredicate)
public RetryPolicy()
public RetryPolicy retryOn(Class<? extends Throwable>... retryOnThrowables)
public RetryPolicy abortOn(Class<? extends Throwable>... abortOnThrowables)
public RetryPolicy abortIf(com.google.common.base.Predicate<Throwable> abortPredicate)
public RetryPolicy retryIf(com.google.common.base.Predicate<Throwable> retryPredicate)
public RetryPolicy dontRetry()
public RetryPolicy withMaxRetries(int times)
public boolean shouldContinue(RetryContext context)
Copyright © 2014. All rights reserved.