public final class OrRetryCondition extends Object implements RetryCondition
Modifier and Type | Method and Description |
---|---|
static OrRetryCondition |
create(RetryCondition... conditions) |
boolean |
equals(Object o) |
int |
hashCode() |
void |
requestSucceeded(RetryPolicyContext context)
Called by the SDK to notify this condition that the provided request succeeded.
|
void |
requestWillNotBeRetried(RetryPolicyContext context)
Called by the SDK to notify this condition that the provided request will not be retried, because some retry condition
determined that it shouldn't be retried.
|
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
public static OrRetryCondition create(RetryCondition... conditions)
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 void requestWillNotBeRetried(RetryPolicyContext context)
RetryCondition
requestWillNotBeRetried
in interface RetryCondition
public void requestSucceeded(RetryPolicyContext context)
RetryCondition
RetryPolicyContext.retriesAttempted()
is zero).requestSucceeded
in interface RetryCondition
Copyright © 2022. All rights reserved.