Class MpmcConcurrentQueueStateMarkers<E>

    • Field Detail

      • SIZE_OF_ELEMENT

        protected static final int SIZE_OF_ELEMENT
      • capacity

        protected final int capacity
      • mask

        protected final long mask
      • buffer

        protected final E[] buffer
    • Constructor Detail

      • MpmcConcurrentQueueStateMarkers

        public MpmcConcurrentQueueStateMarkers​(int capacity)
    • Method Detail

      • add

        public boolean add​(E e)
        Specified by:
        add in interface Collection<E>
        Specified by:
        add in interface Queue<E>
      • offer

        public boolean offer​(E e)
        Specified by:
        offer in interface Queue<E>
      • poll

        public E poll()
        Specified by:
        poll in interface Queue<E>
      • remove

        public E remove()
        Specified by:
        remove in interface Queue<E>
      • element

        public E element()
        Specified by:
        element in interface Queue<E>
      • peek

        public E peek()
        Specified by:
        peek in interface Queue<E>
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface Collection<E>
      • lvHead

        protected final long lvHead()
      • casHead

        protected final boolean casHead​(long expect,
                                        long newValue)
      • lvTail

        protected final long lvTail()
      • casTail

        protected final boolean casTail​(long expect,
                                        long newValue)
      • calcOffset

        protected final long calcOffset​(long index)
      • spElement

        protected final void spElement​(E[] buffer,
                                       long offset,
                                       E e)
      • soElement

        protected final void soElement​(E[] buffer,
                                       long offset,
                                       Object e)
      • svElement

        protected final void svElement​(E[] buffer,
                                       long offset,
                                       Object e)
      • lvElement

        protected final Object lvElement​(E[] buffer,
                                         long offset)