|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.octo.android.robospice.retry.DefaultRetryPolicy
public class DefaultRetryPolicy
Default RetryPolicy
implementation. Proposes an exponential back off
algorithm. When getRetryCount()
returns 0, the request is not
retried anymore and will fail. Between each retry attempt, the request
processor will sleep for getDelayBeforeRetry()
milliseconds.
Field Summary | |
---|---|
static float |
DEFAULT_BACKOFF_MULT
The default backoff multiplier. |
static long |
DEFAULT_DELAY_BEFORE_RETRY
The default delay before retry a request (in ms). |
static int |
DEFAULT_RETRY_COUNT
The default number of retry attempts. |
Constructor Summary | |
---|---|
DefaultRetryPolicy()
|
|
DefaultRetryPolicy(int retryCount,
long delayBeforeRetry,
float backOffMultiplier)
|
Method Summary | |
---|---|
long |
getDelayBeforeRetry()
|
int |
getRetryCount()
|
void |
retry(SpiceException e)
Hook method invoked when an exception occured. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_RETRY_COUNT
public static final long DEFAULT_DELAY_BEFORE_RETRY
public static final float DEFAULT_BACKOFF_MULT
Constructor Detail |
---|
public DefaultRetryPolicy(int retryCount, long delayBeforeRetry, float backOffMultiplier)
public DefaultRetryPolicy()
Method Detail |
---|
public int getRetryCount()
getRetryCount
in interface RetryPolicy
public void retry(SpiceException e)
RetryPolicy
retry
in interface RetryPolicy
e
- the exception that occured during last request invocation.public long getDelayBeforeRetry()
getDelayBeforeRetry
in interface RetryPolicy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |