All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qcloud.cos.auth.CredentialsEndpointRetryPolicy Maven / Gradle / Ivy

There is a newer version: 5.6.238.2
Show newest version
package com.qcloud.cos.auth;

public interface CredentialsEndpointRetryPolicy {
    CredentialsEndpointRetryPolicy NO_RETRY_POLICY = new CredentialsEndpointRetryPolicy() {
        @Override
        public boolean shouldRetry(int attemptedRetries, CredentialsEndpointRetryParameters retryParameters) {
            return false;
        }
    };

    /**
     * Checks whether a failed request should be retried;
     *
     * @param attemptedRetries The number of times the current request has been attempted.
     * @param retryParameters the requested error code and exception are wrapped in the retryParameters
     * @return True if the failed request should be retried
     */
    boolean shouldRetry(int attemptedRetries, CredentialsEndpointRetryParameters retryParameters);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy