本文整理匯總了Java中com.path.android.jobqueue.RetryConstraint.CANCEL屬性的典型用法代碼示例。如果您正苦於以下問題:Java RetryConstraint.CANCEL屬性的具體用法?Java RetryConstraint.CANCEL怎麽用?Java RetryConstraint.CANCEL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.path.android.jobqueue.RetryConstraint
的用法示例。
在下文中一共展示了RetryConstraint.CANCEL屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: shouldReRunOnThrowable
@Override
protected RetryConstraint shouldReRunOnThrowable(Throwable throwable, int runCount,
int maxRunCount) {
if (shouldRetry(throwable)) {
// For the purposes of the demo, just back off 250 ms.
RetryConstraint constraint = RetryConstraint
.createExponentialBackoff(runCount, 250);
constraint.setApplyNewDelayToGroup(true);
return constraint;
}
return RetryConstraint.CANCEL;
}
示例2: shouldReRunOnThrowable
@Override
public RetryConstraint shouldReRunOnThrowable(Throwable throwable, int runCount,
int maxRunCount) {
if (shouldRetry(throwable)) {
return RetryConstraint.createExponentialBackoff(runCount, 1000);
}
return RetryConstraint.CANCEL;
}
示例3: shouldReRunOnThrowable
@Override
protected RetryConstraint shouldReRunOnThrowable(Throwable throwable, int runCount, int maxRunCount) {
return RetryConstraint.CANCEL;
}
示例4: shouldReRunOnThrowable
@Override
protected RetryConstraint shouldReRunOnThrowable(Throwable throwable,
int runCount,
int maxRunCount) {
return RetryConstraint.CANCEL;
}