public class CompleteMultipartUploadRetryCondition extends java.lang.Object implements RetryPolicy.RetryCondition
Modifier and Type | Field and Description |
---|---|
private SdkPredicate<AmazonS3Exception> |
completeMultipartRetryablePredicate |
private static int |
MAX_RETRY_ATTEMPTS |
private int |
maxCompleteMultipartUploadRetries |
NO_RETRY_CONDITION
Constructor and Description |
---|
CompleteMultipartUploadRetryCondition() |
CompleteMultipartUploadRetryCondition(SdkPredicate<AmazonS3Exception> predicate,
int maxRetryAttempts)
For testing purposes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
shouldRetry(AmazonWebServiceRequest originalRequest,
AmazonClientException exception,
int retriesAttempted)
Returns whether a failed request should be retried according to the
given request context.
|
private static final int MAX_RETRY_ATTEMPTS
private final SdkPredicate<AmazonS3Exception> completeMultipartRetryablePredicate
private final int maxCompleteMultipartUploadRetries
public CompleteMultipartUploadRetryCondition()
CompleteMultipartUploadRetryCondition(SdkPredicate<AmazonS3Exception> predicate, int maxRetryAttempts)
public boolean shouldRetry(AmazonWebServiceRequest originalRequest, AmazonClientException exception, int retriesAttempted)
RetryPolicy.RetryCondition
shouldRetry
in interface RetryPolicy.RetryCondition
originalRequest
- The original request object being executed. For
performance reason, this object is not a defensive copy,
and caller should not attempt to modify its data.exception
- The exception from the failed request, represented as an
AmazonClientException object. There are two types of
exception that will be passed to this method:
retriesAttempted
- The number of times the current request has been
attempted.