| com.google.gdata.client.uploader.BackoffPolicy |
Policy class for determining how long to wait before retrying an HTTP request.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| long | STOP | Value indicating that no more retries should be made, . | |||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DEFAULT | Default backoff policy with a factor of 2, starting at 500ms and getting capped at 64000ms. | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the number of milliseconds to wait before retrying an HTTP request.
| |||||||||||
Resets the policy to begin from its initial state.
| |||||||||||
Value indicating that no more retries should be made, .
Default backoff policy with a factor of 2, starting at 500ms and getting capped at 64000ms.
Gets the number of milliseconds to wait before retrying an HTTP request.
If STOP is returned, no retries should be made.
This method should be used as follows:
long backoffTime = backoffPolicy.getNextBackoffMs();
if (backoffTime = BackoffPolicy.STOP) {
// Stop retrying.
} else {
// Retry after backoffTime.
}
STOP if no more retries should be made
Resets the policy to begin from its initial state.