com.branch.cos.auth.CredentialsEndpointRetryPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of branch_cos_api Show documentation
Show all versions of branch_cos_api Show documentation
branch java sdk for qcloud cos
The newest version!
package com.branch.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);
}