public interface RetryPolicy
| 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.
|
default void |
waitForNextRetry(int attempt)
Waits for the configured retry delay before the next attempt.
|
boolean shouldRetry(Exception e, int attempt)
e - The exception that occurredattempt - The current attempt number (1-based)long getRetryWaitTime(int attempt)
attempt - The current attempt number (1-based)default void waitForNextRetry(int attempt)
throws InterruptedException
attempt - The current attempt number (1-based)InterruptedException - if the thread is interrupted while waitingCopyright © 2026 Alibaba Cloud Computing. All rights reserved.