接口 RetryPolicy

    • 字段详细资料

      • DEFAULT_MAX_ERROR_RETRY

        static final int DEFAULT_MAX_ERROR_RETRY
        SDK default max retry count.
        另请参阅:
        常量字段值
      • DEFAULT_MAX_DELAY_IN_MILLIS

        static final int DEFAULT_MAX_DELAY_IN_MILLIS
        Maximum exponential back-off time before retrying a request.
        另请参阅:
        常量字段值
      • DEFAULT_RETRY_POLICY

        static final DefaultRetryPolicy DEFAULT_RETRY_POLICY
        SDK default retry policy.
    • 方法详细资料

      • 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

        long getDelayBeforeNextRetryInMillis​(BceClientException exception,
                                             int retriesAttempted)
        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 BceClientException 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.