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

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

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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy