/** * Get the next completed result, possibly executing several callbacks until * one finally finishes. Normally a subclass would have to override both * this method and {@link #createInternalState(RepeatContext)} because the * implementation of this method would rely on the details of the internal * state. * * @param context current BatchContext. * @param callback the callback to execute. * @param state maintained by the implementation. * @return a finished result. * @throws Throwable any Throwable emitted during the iteration * * @see #isComplete(RepeatContext) * @see #createInternalState(RepeatContext) */ protected RepeatStatus getNextResult(RepeatContext context, RepeatCallback callback, RepeatInternalState state) throws Throwable { update(context); if (logger.isDebugEnabled()) { logger.debug("Repeat operation about to start at count=" + context.getStartedCount()); } return callback.doInIteration(context); }
/** * Get the next completed result, possibly executing several callbacks until * one finally finishes. Normally a subclass would have to override both * this method and {@link #createInternalState(RepeatContext)} because the * implementation of this method would rely on the details of the internal * state. * * @param context current BatchContext. * @param callback the callback to execute. * @param state maintained by the implementation. * @return a finished result. * @throws Throwable any Throwable emitted during the iteration * * @see #isComplete(RepeatContext) * @see #createInternalState(RepeatContext) */ protected RepeatStatus getNextResult(RepeatContext context, RepeatCallback callback, RepeatInternalState state) throws Throwable { update(context); if (logger.isDebugEnabled()) { logger.debug("Repeat operation about to start at count=" + context.getStartedCount()); } return callback.doInIteration(context); }