Interface RetryCondition
- All Known Implementing Classes:
AndRetryCondition
,MaxNumberOfRetriesCondition
,OrRetryCondition
,RetryOnClockSkewCondition
,RetryOnErrorCodeCondition
,RetryOnExceptionsCondition
,RetryOnStatusCodeCondition
,RetryOnThrottlingCondition
,TokenBucketRetryCondition
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Deprecated.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RetryCondition
Deprecated.static RetryCondition
none()
Deprecated.A retry condition that will NEVER allow retries.default void
requestSucceeded
(RetryPolicyContext context) Deprecated.Called by the SDK to notify this condition that the provided request succeeded.default void
Deprecated.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) Deprecated.Determine whether a request should or should not be retried.
-
Method Details
-
shouldRetry
Deprecated.Determine whether a request should or should not be retried.- 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.
-
requestWillNotBeRetried
Deprecated.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. -
requestSucceeded
Deprecated.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). -
defaultRetryCondition
Deprecated. -
none
-
RetryStrategy.Builder.retryOnException(Predicate)
.