public final class RetryOnExceptionsCondition extends Object implements RetryCondition
Modifier and Type | Method and Description |
---|---|
static RetryOnExceptionsCondition |
create(Class<? extends Exception>... exceptionsToRetryOn) |
static RetryOnExceptionsCondition |
create(Set<Class<? extends Exception>> exceptionsToRetryOn) |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
shouldRetry(RetryPolicyContext context)
Determine whether a request should or should not be retried.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
defaultRetryCondition, none, requestSucceeded, requestWillNotBeRetried
public boolean shouldRetry(RetryPolicyContext context)
RetryCondition
shouldRetry
in interface RetryCondition
context
- Context about the state of the last request and information about the number of requests made.public static RetryOnExceptionsCondition create(Set<Class<? extends Exception>> exceptionsToRetryOn)
exceptionsToRetryOn
- Exception classes to retry on.public static RetryOnExceptionsCondition create(Class<? extends Exception>... exceptionsToRetryOn)
exceptionsToRetryOn
- Exception classes to retry on.Copyright © 2020. All rights reserved.