类 InfiniteLoopWriter
- java.lang.Object
- org.springframework.batch.core.listener.StepExecutionListenerSupport
- org.springframework.batch.sample.common.InfiniteLoopWriter
- 所有已实现的接口:
StepExecutionListener,StepListener,ItemWriter<java.lang.Object>
public class InfiniteLoopWriter extends StepExecutionListenerSupport implements ItemWriter<java.lang.Object>
Simple module implementation that will always return true to indicate that processing should continue. This is useful for testing graceful shutdown of jobs.- 作者:
- Lucas Ward
构造器概要
构造器 构造器 说明 InfiniteLoopWriter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidbeforeStep(StepExecution stepExecution)Initialize the state of the listener with theStepExecutionfrom the current scope.voidwrite(java.util.List<? extends java.lang.Object> items)Process the supplied data element.从类继承的方法 org.springframework.batch.core.listener.StepExecutionListenerSupport
afterStep
构造器详细资料
InfiniteLoopWriter
public InfiniteLoopWriter()
方法详细资料
beforeStep
public void beforeStep(StepExecution stepExecution)
从接口复制的说明:StepExecutionListenerInitialize the state of the listener with theStepExecutionfrom the current scope.- 指定者:
beforeStep在接口中StepExecutionListener- 覆盖:
beforeStep在类中StepExecutionListenerSupport- 参数:
stepExecution- instance ofStepExecution.- 另请参阅:
StepExecutionListener.beforeStep(StepExecution)
write
public void write(java.util.List<? extends java.lang.Object> items) throws java.lang.Exception
从接口复制的说明:ItemWriterProcess the supplied data element. Will not be called with any null items in normal operation.- 指定者:
write在接口中ItemWriter<java.lang.Object>- 参数:
items- items to be written- 抛出:
java.lang.Exception- if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.