|Constructor and Description|
|Modifier and Type||Method and Description|
Do the work required for this chunk of the step.
public StepContextRepeatCallback(StepExecution stepExecution)
public RepeatStatus doInIteration(RepeatContext context) throws Exception
StepContextlifecycle. Business processing should be delegated to
doInChunkContext(RepeatContext, ChunkContext). This is to ensure that the current thread has a reference to the context, even if the callback is executed in a pooled thread. Handles the registration and de-registration of the step context, so clients should not duplicate those calls.
context- the current context passed in by the caller.
RepeatStatuswhich is continuable if there is (or may be) more data to process.
Exception- if there is a problem with the processing.
public abstract RepeatStatus doInChunkContext(RepeatContext context, ChunkContext chunkContext) throws Exception
ChunkContextprovided is managed by the base class, so that if there is still work to do for the task in hand state can be stored here. In a multi-threaded client, the base class ensures that only one thread at a time can be working on each instance of
ChunkContext. Workers should signal that they are finished with a context by removing all the attributes they have added. If a worker does not remove them another thread might see stale state.
Copyright © 2014 Pivotal. All rights reserved.