java.lang.Object | |
↳ | com.android.volley.DefaultRetryPolicy |
Default retry policy for requests.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float | DEFAULT_BACKOFF_MULT | The default backoff multiplier | |||||||||
int | DEFAULT_MAX_RETRIES | The default number of retries | |||||||||
int | DEFAULT_TIMEOUT_MS | The default socket timeout in milliseconds |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DefaultRetryPolicy()
Constructs a new retry policy using the default timeouts.
| |||||||||||
DefaultRetryPolicy(int initialTimeoutMs, int maxNumRetries, float backoffMultiplier)
Constructs a new retry policy.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float |
getBackoffMultiplier()
Returns the backoff multiplier for the policy.
| ||||||||||
int |
getCurrentRetryCount()
Returns the current retry count.
| ||||||||||
int |
getCurrentTimeout()
Returns the current timeout.
| ||||||||||
void |
retry(VolleyError error)
Prepares for the next retry by applying a backoff to the timeout.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
hasAttemptRemaining()
Returns true if this policy has attempts remaining, false otherwise.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.android.volley.RetryPolicy
|
The default backoff multiplier
The default number of retries
The default socket timeout in milliseconds
Constructs a new retry policy using the default timeouts.
Constructs a new retry policy.
initialTimeoutMs | The initial timeout for the policy. |
---|---|
maxNumRetries | The maximum number of retries. |
backoffMultiplier | Backoff multiplier for the policy. |
Returns the backoff multiplier for the policy.
Returns the current retry count.
Returns the current timeout.
Prepares for the next retry by applying a backoff to the timeout.
error | The error code of the last attempt. |
---|
VolleyError |
---|
Returns true if this policy has attempts remaining, false otherwise.