|
||||||||||
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 DisposableBean
Exception
public final void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public ProcessIndicatorItemWrapper<T> read() throws DataAccessException
ItemReader
null
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>>
DataAccessException
public ExitStatus afterStep(StepExecution stepExecution)
StepExecutionListener
ExitStatus.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 StepExecutionListener
ExitStatus
to combine with the normal value. Return
null to leave the old value unchanged.public void beforeStep(StepExecution stepExecution)
StepExecutionListener
StepExecution
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 |