DefaultRetrySchemepublic class DefaultRetryScheme extends AbstractRetryScheme Default retry scheme, based on specs. |
Fields Summary |
---|
private static final String | TAG | private static final boolean | DEBUG | private static final boolean | LOCAL_LOGV | private static final int[] | sDefaultRetryScheme |
Constructors Summary |
---|
public DefaultRetryScheme(android.content.Context context, int type, int errorType)
this(context, type, 0, errorType);
| public DefaultRetryScheme(android.content.Context context, int type, int retriedTimes, int errorType)
super(type, retriedTimes, errorType);
mRetriedTimes = mRetriedTimes < 0 ? 0 : mRetriedTimes;
mRetriedTimes = mRetriedTimes >= sDefaultRetryScheme.length
? sDefaultRetryScheme.length - 1 : mRetriedTimes;
// TODO Get retry scheme from preference.
|
Methods Summary |
---|
public int | getRetryLimit()
return sDefaultRetryScheme.length;
| public long | getWaitingInterval()
if (LOCAL_LOGV) {
Log.v(TAG, "Next int: " + sDefaultRetryScheme[mRetriedTimes]);
}
return sDefaultRetryScheme[mRetriedTimes];
|
|