接口 RetryPolicy
- 所有已知实现类:
DefaultRetryPolicy
public interface RetryPolicy
Retry policy that can be configured on a specific service client using
ClientConfiguration.-
字段概要
字段修饰符和类型字段说明static final intMaximum exponential back-off time before retrying a request.static final intSDK default max retry count.static final DefaultRetryPolicySDK default retry policy. -
方法概要
修饰符和类型方法说明longgetDelayBeforeNextRetryInMillis(MochowClientException exception, int retriesAttempted) Returns the delay (in milliseconds) before next retry attempt.longReturns the maximum delay time (in milliseconds) before retrying a request.intReturns the maximum number of retry attempts.
-
字段详细资料
-
方法详细资料
-
getMaxErrorRetry
int getMaxErrorRetry()Returns the maximum number of retry attempts.- 返回:
- The maximum number of retry attempts.
-
getMaxDelayInMillis
long getMaxDelayInMillis()Returns the maximum delay time (in milliseconds) before retrying a request.- 返回:
- the maximum delay time (in milliseconds) before retrying a request.
-
getDelayBeforeNextRetryInMillis
Returns the delay (in milliseconds) before next retry attempt. A negative value indicates that no more retries should be made.- 参数:
exception- the exception from the failed request, represented as an MochowClientException object.retriesAttempted- the number of times the current request has been attempted (not including the next attempt after the delay).- 返回:
- the delay (in milliseconds) before next retry attempt.A negative value indicates that no more retries should be made.
-