Class SpscChunkedArrayQueue<E>

Type Parameters:
E -
All Implemented Interfaces:
Iterable<E>, Collection<E>, Queue<E>, IndexedQueueSizeUtil.IndexedQueue, MessagePassingQueue<E>, QueueProgressIndicators

public class SpscChunkedArrayQueue<E> extends BaseSpscLinkedArrayQueue<E>
An SPSC array queue which starts at initialCapacity and grows to maxCapacity in linked chunks of the initial size. The queue grows only when the current chunk is full and elements are not copied on resize, instead a link to the new chunk is stored in the old chunk for the consumer to follow.
  • Field Details

    • maxQueueCapacity

      private final int maxQueueCapacity
    • producerQueueLimit

      private long producerQueueLimit
  • Constructor Details

    • SpscChunkedArrayQueue

      public SpscChunkedArrayQueue(int capacity)
    • SpscChunkedArrayQueue

      public SpscChunkedArrayQueue(int chunkSize, int capacity)
  • Method Details