public class NoRetryPolicy extends Object implements RetryPolicy
This is the default policy for client errors (4xx) and other non-retryable exceptions.
| Modifier and Type | Field and Description |
|---|---|
static NoRetryPolicy |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
long |
getRetryWaitTime(int attempt)
Calculates the wait time before the next retry attempt.
|
boolean |
shouldRetry(Exception e,
int attempt)
Determines whether an operation should be retried based on the exception and attempt count.
|
void |
waitForNextRetry(int attempt)
Waits for the configured retry delay before the next attempt.
|
public static final NoRetryPolicy INSTANCE
public boolean shouldRetry(Exception e, int attempt)
RetryPolicyshouldRetry in interface RetryPolicye - The exception that occurredattempt - The current attempt number (1-based)public long getRetryWaitTime(int attempt)
RetryPolicygetRetryWaitTime in interface RetryPolicyattempt - The current attempt number (1-based)public void waitForNextRetry(int attempt)
RetryPolicywaitForNextRetry in interface RetryPolicyattempt - The current attempt number (1-based)Copyright © 2026 Alibaba Cloud Computing. All rights reserved.