1 package org.sapia.taskman; 2 3 18 public class TestRetryTask extends RetryTask { 19 int _count = 0; 20 int _abortCount = 1; 21 22 TestRetryTask(int abortCount, int maxRetries) { 23 super(maxRetries); 24 _abortCount = abortCount; 25 } 26 27 30 protected void doExec(TaskContext ctx) { 31 _count++; 32 33 if(_count == _abortCount) { 34 abort(); 35 } 36 } 37 } 38 | Popular Tags |