Interface ReaderGroupNotificationListener

  • All Known Subinterfaces:
    ReaderGroup

    public interface ReaderGroupNotificationListener
    ReaderGroup notification listener interface. This has the list of notifications supported by ReaderGroup.
    • Method Detail

      • getSegmentNotifier

        Observable<SegmentNotification> getSegmentNotifier​(java.util.concurrent.ScheduledExecutorService executor)
        Get a segment notifier for a given reader group.
        A segment notifier is triggered when the total number of segments managed by the ReaderGroup changes. During a scale operation segments can be split into multiple or merge into some other segment causing the total number of segments to change. The total number of segments can also change when configuration of the reader group is changed, for example modify the configuration of a reader group to add/remove a stream.

        Note:
        * In case of a seal stream operation the segments are sealed and the segment has no successors. In this case the notifier is not triggered.

        Parameters:
        executor - executor on which the listeners run.
        Returns:
        Observable of type SegmentNotification.
      • getEndOfDataNotifier

        Observable<EndOfDataNotification> getEndOfDataNotifier​(java.util.concurrent.ScheduledExecutorService executor)
        Get an end of data notifier for a given reader group.
        An end of data notifier is triggered when the readers have read all the data of the stream(s) managed by the reader group. This is useful to process the stream data with a batch job where the application wants to read data of sealed stream(s).

        Note:
        * In case of a reader group managing streams, where not all streams are sealed, then EndOfDataNotification notifier is never triggered since readers continue reading the unsealed stream once it has completed reading the sealed stream.

        Parameters:
        executor - executor on which the listeners run.
        Returns:
        Observable of type EndOfDataNotification.