Class MaxNumberOfRetriesCondition
- java.lang.Object
-
- software.amazon.awssdk.core.retry.conditions.MaxNumberOfRetriesCondition
-
- All Implemented Interfaces:
RetryCondition
public final class MaxNumberOfRetriesCondition extends Object implements RetryCondition
Simple retry condition that allows retries up to a certain max number of retries.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MaxNumberOfRetriesCondition
create(int maxNumberOfRetries)
boolean
equals(Object o)
static MaxNumberOfRetriesCondition
forRetryMode(RetryMode retryMode)
int
hashCode()
boolean
shouldRetry(RetryPolicyContext context)
Determine whether a request should or should not be retried.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.retry.conditions.RetryCondition
requestSucceeded, requestWillNotBeRetried
-
-
-
-
Method Detail
-
create
public static MaxNumberOfRetriesCondition create(int maxNumberOfRetries)
-
forRetryMode
public static MaxNumberOfRetriesCondition forRetryMode(RetryMode retryMode)
-
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 the request should be retried, false if not.
-
-