public class RetryManager extends Object
Modifier and Type | Field and Description |
---|---|
protected static int[] |
BACKOFF
seconds to wait until next retry
|
Constructor and Description |
---|
RetryManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
isRecoverable(WebbException webbException)
Analyzes whether the cause of an exception is worth retrying the request.
|
boolean |
isRetryUseful(Response response)
Indicates whether it would possibly make sense to retry the request.
|
void |
wait(int retry)
Implementation for the actual wait (depends on the current retry sequence).
|
public boolean isRetryUseful(Response response)
response
- the outcome of the requestpublic boolean isRecoverable(WebbException webbException)
webbException
- the exception to analyzepublic void wait(int retry)
retry
- the retry sequence (starts with 0 for the first retry).Copyright © 2016. All rights reserved.