类 ChunkListenerSupport
- java.lang.Object
- org.springframework.batch.core.listener.ChunkListenerSupport
- 所有已实现的接口:
ChunkListener
,StepListener
public class ChunkListenerSupport extends java.lang.Object implements ChunkListener
Basic support implementation ofChunkListener
- 作者:
- Lucas Ward, Michael Minella
字段概要
从接口继承的字段 org.springframework.batch.core.ChunkListener
ROLLBACK_EXCEPTION_KEY
构造器概要
构造器 构造器 说明 ChunkListenerSupport()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterChunk(ChunkContext context)
Callback after the chunk is executed, outside the transaction.void
afterChunkError(ChunkContext context)
Callback after a chunk has been marked for rollback.void
beforeChunk(ChunkContext context)
Callback before the chunk is executed, but inside the transaction.
构造器详细资料
ChunkListenerSupport
public ChunkListenerSupport()
方法详细资料
afterChunk
public void afterChunk(ChunkContext context)
从接口复制的说明:ChunkListener
Callback after the chunk is executed, outside the transaction.- 指定者:
afterChunk
在接口中ChunkListener
- 参数:
context
- The currentChunkContext
beforeChunk
public void beforeChunk(ChunkContext context)
从接口复制的说明:ChunkListener
Callback before the chunk is executed, but inside the transaction.- 指定者:
beforeChunk
在接口中ChunkListener
- 参数:
context
- The currentChunkContext
afterChunkError
public void afterChunkError(ChunkContext context)
从接口复制的说明:ChunkListener
Callback after a chunk has been marked for rollback. It is invoked after transaction rollback. While the rollback will have occurred, transactional resources might still be active and accessible. Due to this, data access code within this callback will still "participate" in the original transaction unless it declares that it runs in its own transaction. Hence: Use PROPAGATION_REQUIRES_NEW for any transactional operation that is called from here.- 指定者:
afterChunkError
在接口中ChunkListener
- 参数:
context
- the chunk context containing the exception that caused the underlying rollback.