ExponentialRetryPolicy, StaticRetryPolicypublic abstract class AbfsRetryPolicy
extends java.lang.Object
AbfsClient
Implementation to be used is based on retry cause.| Modifier | Constructor | Description |
|---|---|---|
protected |
AbfsRetryPolicy(int maxRetryCount,
java.lang.String retryPolicyAbbreviation) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getAbbreviation() |
Returns a String value of the abbreviation
denoting which type of retry policy is used
|
protected int |
getMaxRetryCount() |
Returns maximum number of retries allowed in this retry policy
|
abstract long |
getRetryInterval(int retryCount) |
Returns backoff interval to be used for a particular retry count
Child class should define how they want to calculate retry interval
|
boolean |
shouldRetry(int retryCount,
int statusCode) |
Returns if a request should be retried based on the retry count, current response,
and the current strategy.
|
java.lang.String |
toString() |
protected AbfsRetryPolicy(int maxRetryCount,
java.lang.String retryPolicyAbbreviation)
public boolean shouldRetry(int retryCount,
int statusCode)
retryCount - The current retry attempt count.statusCode - The status code of the response, or -1 for socket error.public abstract long getRetryInterval(int retryCount)
retryCount - The current retry attempt count.public java.lang.String getAbbreviation()
protected int getMaxRetryCount()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.