Package org.jeasy.batch.core.listener
Interface BatchListener<P>
-
- Type Parameters:
P
- type of the record's payload
- All Known Implementing Classes:
CompositeBatchListener
public interface BatchListener<P>
Allow implementing classes to get notified before/after processing each batch. Exception handling is done by the implementing class.- Author:
- Mahmoud Ben Hassine ([email protected])
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
afterBatchProcessing(Batch<P> batch)
Executed after processing each batch.default void
afterBatchWriting(Batch<P> batch)
Executed after successfully writing each batch.default void
beforeBatchReading()
Executed before reading each batch.default void
onBatchWritingException(Batch<P> batch, java.lang.Throwable throwable)
Executed when an error occurs during writing each batch.
-
-
-
Method Detail
-
beforeBatchReading
default void beforeBatchReading()
Executed before reading each batch.
-
afterBatchProcessing
default void afterBatchProcessing(Batch<P> batch)
Executed after processing each batch.- Parameters:
batch
- the batch of records that has been processed
-
afterBatchWriting
default void afterBatchWriting(Batch<P> batch)
Executed after successfully writing each batch.- Parameters:
batch
- the batch of records that has been written
-
-