Class RetryPolicy.NoRetry
java.lang.Object
cloud.opencode.base.cache.spi.RetryPolicy.NoRetry
- All Implemented Interfaces:
RetryPolicy
- Enclosing interface:
RetryPolicy
No retry implementation
- Since:
- JDK 25, opencode-base-cache V1.9.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from interface RetryPolicy
RetryPolicy.CustomRetryPolicy, RetryPolicy.ExponentialBackoff, RetryPolicy.FixedDelay, RetryPolicy.NoRetry -
Method Summary
Modifier and TypeMethodDescriptiongetDelay(int attempt) Calculate delay before the next retry attempt 计算下次重试前的延迟intGet the maximum number of retry attempts 获取最大重试次数Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RetryPolicy
retryOn, shouldRetry
-
Method Details
-
maxRetries
public int maxRetries()Description copied from interface:RetryPolicyGet the maximum number of retry attempts 获取最大重试次数- Specified by:
maxRetriesin interfaceRetryPolicy- Returns:
- max retries (0 means no retry) | 最大重试次数(0 表示不重试)
-
getDelay
Description copied from interface:RetryPolicyCalculate delay before the next retry attempt 计算下次重试前的延迟- Specified by:
getDelayin interfaceRetryPolicy- Parameters:
attempt- current attempt number (1-based) | 当前尝试次数(从 1 开始)- Returns:
- delay before retry | 重试前的延迟
-