Top Description Fields Constructors Methods
io.netty.util.internal.shaded.org.jctools.queues

public Class SpscChunkedArrayQueue<E>

extends BaseSpscLinkedArrayQueue<E>
Class Inheritance
Imports
io.netty.util.internal.shaded.org.jctools.util.Pow2, .RangeUtil

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 Summary

Modifier and TypeField and Description
private final int
private long

Constructor Summary

AccessConstructor and Description
public
SpscChunkedArrayQueue(int capacity)

public
SpscChunkedArrayQueue(int chunkSize, int capacity)

Method Summary

Modifier and TypeMethod and Description
public int
pack-priv final boolean
offerColdPath(E[] buffer, long mask, long pIndex, long offset, E v, MessagePassingQueue.Supplier<? extends E> s)

Implements abstract io.netty.util.internal.shaded.org.jctools.queues.BaseSpscLinkedArrayQueue.offerColdPath.

Inherited from io.netty.util.internal.shaded.org.jctools.queues.BaseSpscLinkedArrayQueue:
currentConsumerIndexcurrentProducerIndexdraindraindrainfillfillfillisEmptyiteratorlinkOldToNewlvNextArrayAndUnlinkofferpeekpollrelaxedOfferrelaxedPeekrelaxedPollsizesoNexttoStringwriteToQueue

Field Detail

maxQueueCapacityback to summary
private final int maxQueueCapacity
producerQueueLimitback to summary
private long producerQueueLimit

Constructor Detail

SpscChunkedArrayQueueback to summary
public SpscChunkedArrayQueue(int capacity)
SpscChunkedArrayQueueback to summary
public SpscChunkedArrayQueue(int chunkSize, int capacity)

Method Detail

capacityback to summary
public int capacity()

Implements io.netty.util.internal.shaded.org.jctools.queues.MessagePassingQueue.capacity, io.netty.util.internal.shaded.org.jctools.queues.IndexedQueueSizeUtil.IndexedQueue.capacity.

Returns:int

Doc from io.netty.util.internal.shaded.org.jctools.queues.MessagePassingQueue.capacity.

the capacity of this queue or MessagePassingQueue#UNBOUNDED_CAPACITY if not bounded

Annotations
@Override
offerColdPathback to summary
pack-priv final boolean offerColdPath(E[] buffer, long mask, long pIndex, long offset, E v, MessagePassingQueue.Supplier<? extends E> s)

Implements abstract io.netty.util.internal.shaded.org.jctools.queues.BaseSpscLinkedArrayQueue.offerColdPath.

Annotations
@Override