本文整理汇总了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;
}