Class MpscLinkedArrayQueue<T>

  • All Implemented Interfaces:
    java.lang.Iterable<T>, java.util.Collection<T>, java.util.Queue<T>

    public final class MpscLinkedArrayQueue<T>
    extends java.util.AbstractQueue<T>
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  MpscLinkedArrayQueue.ARA2  
    • Constructor Summary

      Constructors 
      Constructor Description
      MpscLinkedArrayQueue​(int arrayCapacity)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEmpty()  
      java.util.Iterator<T> iterator()  
      boolean offer​(T value)  
      T peek()  
      T poll()  
      int size()  
      T weakPeek()  
      T weakPoll()  
      • Methods inherited from class java.util.AbstractQueue

        add, addAll, clear, element, remove
      • Methods inherited from class java.util.AbstractCollection

        contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Field Detail

      • producerIndex

        final java.util.concurrent.atomic.AtomicLong producerIndex
      • consumerIndex

        final java.util.concurrent.atomic.AtomicLong consumerIndex
      • consumerOffset

        int consumerOffset
      • maxOffset

        final int maxOffset
      • ALLOCATING

        static final java.lang.Object ALLOCATING
    • Constructor Detail

      • MpscLinkedArrayQueue

        public MpscLinkedArrayQueue​(int arrayCapacity)
    • Method Detail

      • offer

        public boolean offer​(T value)
      • poll

        public T poll()
      • weakPoll

        public T weakPoll()
      • peek

        public T peek()
      • weakPeek

        public T weakPeek()
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<T>
        Overrides:
        isEmpty in class java.util.AbstractCollection<T>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<T>
        Specified by:
        size in class java.util.AbstractCollection<T>
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Specified by:
        iterator in class java.util.AbstractCollection<T>