Class OrRetryCondition
- java.lang.Object
-
- software.amazon.awssdk.core.retry.conditions.OrRetryCondition
-
- All Implemented Interfaces:
RetryCondition
@SdkPublicApi public final class OrRetryCondition extends Object implements RetryCondition
Composite retry condition that evaluates to true if any containing condition evaluates to true.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OrRetryConditioncreate(RetryCondition... conditions)booleanequals(Object o)inthashCode()voidrequestSucceeded(RetryPolicyContext context)Called by the SDK to notify this condition that the provided request succeeded.voidrequestWillNotBeRetried(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.booleanshouldRetry(RetryPolicyContext context)Determine whether a request should or should not be retried.StringtoString()
-
-
-
Method Detail
-
create
public static OrRetryCondition create(RetryCondition... conditions)
-
shouldRetry
public boolean shouldRetry(RetryPolicyContext context)
Description copied from interface:RetryConditionDetermine whether a request should or should not be retried.- Specified by:
shouldRetryin interfaceRetryCondition- Parameters:
context- Context about the state of the last request and information about the number of requests made.- Returns:
- True if any condition returns true. False otherwise.
-
requestWillNotBeRetried
public void requestWillNotBeRetried(RetryPolicyContext context)
Description copied from interface:RetryConditionCalled 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.- Specified by:
requestWillNotBeRetriedin interfaceRetryCondition
-
requestSucceeded
public void requestSucceeded(RetryPolicyContext context)
Description copied from interface:RetryConditionCalled by the SDK to notify this condition that the provided request succeeded. This method is invoked even if the execution never failed before (RetryPolicyContext.retriesAttempted()is zero).- Specified by:
requestSucceededin interfaceRetryCondition
-
-