public abstract class AbfsRetryPolicy extends Object
AbfsClient
Implementation to be used is based on retry cause.| Modifier | Constructor and Description |
|---|---|
protected |
AbfsRetryPolicy(int maxRetryCount,
String retryPolicyAbbreviation) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
String |
toString() |
protected AbfsRetryPolicy(int maxRetryCount,
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 String getAbbreviation()
protected int getMaxRetryCount()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.