com.qcloud.cos.auth.InstanceCredentialsRetryPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cos_api-bundle Show documentation
Show all versions of cos_api-bundle Show documentation
A single bundled dependency that includes all service and dependent JARs with third-party libraries
relocated to different namespaces.
package com.qcloud.cos.auth;
public class InstanceCredentialsRetryPolicy implements CredentialsEndpointRetryPolicy {
private static final int MAX_RETRIES = 5;
private static InstanceCredentialsRetryPolicy instance;
public static InstanceCredentialsRetryPolicy getInstance() {
if (null == instance) {
instance = new InstanceCredentialsRetryPolicy();
}
return instance;
}
private InstanceCredentialsRetryPolicy() {
}
@Override
public boolean shouldRetry(int attemptedRetries, CredentialsEndpointRetryParameters retryParameters) {
return false;
}
}