Example usage for org.springframework.batch.repeat RepeatContext getStartedCount

List of usage examples for org.springframework.batch.repeat RepeatContext getStartedCount

Introduction

In this page you can find the example usage for org.springframework.batch.repeat RepeatContext getStartedCount.

Prototype

int getStartedCount();

Source Link

Document

Public access to a counter for the number of operations attempted.

Usage

From source file:org.springframework.batch.repeat.support.RepeatTemplate.java

/**
 * 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./*from ww  w .j  a  v  a2 s  .co  m*/
 * 
 * @param context current BatchContext.
 * @param callback the callback to execute.
 * @param state maintained by the implementation.
 * @return a finished result.
 * 
 * @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);

}