public class StagingItemReader<T> extends java.lang.Object implements ItemReader<ProcessIndicatorItemWrapper<T>>, StepExecutionListener, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
ItemReader implementing the process indicator
pattern.
To achieve restartability use together with StagingItemProcessor.| Constructor and Description |
|---|
StagingItemReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
ExitStatus |
afterStep(StepExecution stepExecution)
Give a listener a chance to modify the exit status from a step.
|
void |
beforeStep(StepExecution stepExecution)
Initialize the state of the listener with the
StepExecution from
the current scope. |
void |
destroy() |
ProcessIndicatorItemWrapper<T> |
read()
Reads a piece of input data and advance to the next one.
|
void |
setDataSource(javax.sql.DataSource dataSource) |
public void setDataSource(javax.sql.DataSource dataSource)
public void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exceptionpublic final void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic ProcessIndicatorItemWrapper<T> read()
ItemReadernull at the end of the input
data set. In a transactional setting, caller might get the same item
twice from successive calls (or otherwise), if the first call was in a
transaction that rolled back.read in interface ItemReader<ProcessIndicatorItemWrapper<T>>public ExitStatus afterStep(StepExecution stepExecution)
StepExecutionListenerExitStatus.and(ExitStatus).
Called after execution of step's processing logic (both successful or
failed). Throwing exception in this method has no effect, it will only be
logged.afterStep in interface StepExecutionListenerExitStatus to combine with the normal value. Return
null to leave the old value unchanged.public void beforeStep(StepExecution stepExecution)
StepExecutionListenerStepExecution from
the current scope.beforeStep in interface StepExecutionListener