|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.sample.common.StagingItemReader<T>
public class StagingItemReader<T>
Thread-safe database ItemReader implementing the process indicator
pattern.
To achieve restartability use together with StagingItemProcessor.
| Constructor Summary | |
|---|---|
StagingItemReader()
|
|
| Method Summary | |
|---|---|
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()
|
ExitStatus |
onErrorInStep(StepExecution stepExecution,
Throwable e)
|
ProcessIndicatorItemWrapper<T> |
read()
Reads a piece of input data and advance to the next one. |
void |
setDataSource(DataSource dataSource)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StagingItemReader()
| Method Detail |
|---|
public void setDataSource(DataSource dataSource)
public void destroy()
throws Exception
destroy in interface DisposableBeanException
public final void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanException
public ProcessIndicatorItemWrapper<T> read()
throws DataAccessException
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>>DataAccessExceptionpublic 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
public ExitStatus onErrorInStep(StepExecution stepExecution,
Throwable e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||