Class AndRetryCondition
- java.lang.Object
-
- software.amazon.awssdk.core.retry.conditions.AndRetryCondition
-
- All Implemented Interfaces:
RetryCondition
public final class AndRetryCondition extends Object implements RetryCondition
CompositeRetryCondition
that evaluates to true when all contained retry conditions evaluate to true.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AndRetryCondition
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()
-
-
-
Method Detail
-
create
public static AndRetryCondition create(RetryCondition... conditions)
-
shouldRetry
public boolean shouldRetry(RetryPolicyContext context)
Description copied from interface:RetryCondition
Determine whether a request should or should not be retried.- Specified by:
shouldRetry
in interfaceRetryCondition
- Parameters:
context
- Context about the state of the last request and information about the number of requests made.- Returns:
- True if all conditions are true, false otherwise.
-
requestWillNotBeRetried
public void requestWillNotBeRetried(RetryPolicyContext context)
Description copied from interface:RetryCondition
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.- Specified by:
requestWillNotBeRetried
in interfaceRetryCondition
-
requestSucceeded
public void requestSucceeded(RetryPolicyContext context)
Description copied from interface:RetryCondition
Called 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:
requestSucceeded
in interfaceRetryCondition
-
-