接口 ChunkListener
- 所有超级接口:
StepListener
- 所有已知实现类:
ChunkListenerAdapter
,ChunkListenerSupport
,CompositeChunkListener
,MulticasterBatchListener
,PartitionCollectorAdapter
,StagingItemListener
,StepListenerSupport
public interface ChunkListener extends StepListener
Listener interface for the lifecycle of a chunk. A chunk can be thought of as a collection of items that will be committed together.- 作者:
- Lucas Ward, Michael Minella, Mahmoud Ben Hassine
字段概要
字段 修饰符和类型 字段 说明 static java.lang.String
ROLLBACK_EXCEPTION_KEY
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 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.
字段详细资料
ROLLBACK_EXCEPTION_KEY
static final java.lang.String ROLLBACK_EXCEPTION_KEY
- 另请参阅:
- 常量字段值
方法详细资料
beforeChunk
void beforeChunk(ChunkContext context)
Callback before the chunk is executed, but inside the transaction.- 参数:
context
- The currentChunkContext
afterChunk
void afterChunk(ChunkContext context)
Callback after the chunk is executed, outside the transaction.- 参数:
context
- The currentChunkContext
afterChunkError
void afterChunkError(ChunkContext context)
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.- 参数:
context
- the chunk context containing the exception that caused the underlying rollback.