/**
  * If exit status is not continuable return <code>true</code>, otherwise delegate to {@link
  * #isComplete(RepeatContext)}.
  *
  * @see
  *     org.springframework.batch.repeat.CompletionPolicy#isComplete(org.springframework.batch.repeat.RepeatContext,
  *     RepeatStatus)
  */
 @Override
 public boolean isComplete(RepeatContext context, RepeatStatus result) {
   if (result != null && !result.isContinuable()) {
     return true;
   } else {
     return isComplete(context);
   }
 }
Exemplo n.º 2
0
 public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)
     throws Exception {
   logger.info("{} Countdown: {}", message, callTimes);
   callTimes--;
   return RepeatStatus.continueIf(callTimes > 0);
 }
 /**
  * True if the result is null, or a {@link RepeatStatus} indicating completion.
  *
  * @see
  *     org.springframework.batch.repeat.CompletionPolicy#isComplete(org.springframework.batch.repeat.RepeatContext,
  *     RepeatStatus)
  */
 public boolean isComplete(RepeatContext context, RepeatStatus result) {
   return (result == null || !result.isContinuable());
 }