Class ObserveHandleUtils


  • public class ObserveHandleUtils
    extends java.lang.Object
    • Method Detail

      • isAtHead

        public static boolean isAtHead​(ObserveHandle handle,
                                       CommitLogReader reader)
        Check that the given consumer is at current HEAD position in the CommitLogReader. HEAD is defined as position where the size of backlog is zero (all elements have been consumed and committed). Note that this state might change immediately after this call.
        Parameters:
        handle - ObserveHandle that belongs to a consumer
        reader - CommitLogReader that the consumer consumes from
        Returns:
        true when the consumer is at HEAD position