Class CompositeBatchListener<P>

  • Type Parameters:
    P - type of the record's payload
    All Implemented Interfaces:
    BatchListener<P>

    public class CompositeBatchListener<P>
    extends java.lang.Object
    implements BatchListener<P>
    Composite listener that delegates processing to other listeners.
    Author:
    Mahmoud Ben Hassine ([email protected])
    • Method Detail

      • afterBatchProcessing

        public void afterBatchProcessing​(Batch<P> batch)
        Description copied from interface: BatchListener
        Executed after processing each batch.
        Specified by:
        afterBatchProcessing in interface BatchListener<P>
        Parameters:
        batch - the batch of records that has been processed
      • afterBatchWriting

        public void afterBatchWriting​(Batch<P> batch)
        Description copied from interface: BatchListener
        Executed after successfully writing each batch.
        Specified by:
        afterBatchWriting in interface BatchListener<P>
        Parameters:
        batch - the batch of records that has been written
      • onBatchWritingException

        public void onBatchWritingException​(Batch<P> batch,
                                            java.lang.Throwable throwable)
        Description copied from interface: BatchListener
        Executed when an error occurs during writing each batch.
        Specified by:
        onBatchWritingException in interface BatchListener<P>
        Parameters:
        batch - the batch attempted to be written
        throwable - the error occurred
      • addBatchListener

        public void addBatchListener​(BatchListener<P> batchListener)
        Add a delegate listener.
        Parameters:
        batchListener - to add