Class ProcessingSequenceBarrier

    • Field Detail

      • dependentSequence

        private final Sequence dependentSequence
      • alerted

        private volatile boolean alerted
      • cursorSequence

        private final Sequence cursorSequence
      • sequencer

        private final Sequencer sequencer
    • Method Detail

      • waitFor

        public long waitFor​(long sequence)
                     throws AlertException,
                            java.lang.InterruptedException,
                            TimeoutException
        Description copied from interface: SequenceBarrier
        Wait for the given sequence to be available for consumption.
        Specified by:
        waitFor in interface SequenceBarrier
        Parameters:
        sequence - to wait for
        Returns:
        the sequence up to which is available
        Throws:
        AlertException - if a status change has occurred for the Disruptor
        java.lang.InterruptedException - if the thread needs awaking on a condition variable.
        TimeoutException - if a timeout occurs while waiting for the supplied sequence.
      • getCursor

        public long getCursor()
        Description copied from interface: SequenceBarrier
        Get the current cursor value that can be read.
        Specified by:
        getCursor in interface SequenceBarrier
        Returns:
        value of the cursor for entries that have been published.
      • isAlerted

        public boolean isAlerted()
        Description copied from interface: SequenceBarrier
        The current alert status for the barrier.
        Specified by:
        isAlerted in interface SequenceBarrier
        Returns:
        true if in alert otherwise false.