Class MpscBlockingConsumerArrayQueueConsumerFields<E>

All Implemented Interfaces:
Iterable<E>, Collection<E>, Queue<E>, IndexedQueueSizeUtil.IndexedQueue
Direct Known Subclasses:
MpscBlockingConsumerArrayQueue

abstract class MpscBlockingConsumerArrayQueueConsumerFields<E> extends MpscBlockingConsumerArrayQueuePad3<E>
  • Field Details

    • C_INDEX_OFFSET

      private static final long C_INDEX_OFFSET
    • BLOCKED_OFFSET

      private static final long BLOCKED_OFFSET
    • consumerIndex

      private volatile long consumerIndex
    • consumerMask

      protected final long consumerMask
    • blocked

      private volatile Thread blocked
    • consumerBuffer

      protected final E[] consumerBuffer
  • Constructor Details

    • MpscBlockingConsumerArrayQueueConsumerFields

      MpscBlockingConsumerArrayQueueConsumerFields(long mask, E[] buffer)
  • Method Details

    • lvConsumerIndex

      public final long lvConsumerIndex()
    • lpConsumerIndex

      final long lpConsumerIndex()
    • soConsumerIndex

      final void soConsumerIndex(long newValue)
    • lvBlocked

      final Thread lvBlocked()
    • soBlocked

      final void soBlocked(Thread thread)
      This field should only be written to from the consumer thread. It is set before parking the consumer and nulled when the consumer is unblocked. The value is read by producer thread to unpark the consumer.
      Parameters:
      thread - the consumer thread which is blocked waiting for the producers