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

public Class MpscChunkedUnpaddedArrayQueue<E>

Additional top-level class in compilation unit: MpscChunkedUnpaddedArrayQueueColdProducerFields.

extends MpscChunkedUnpaddedArrayQueueColdProducerFields<E>
Class Inheritance
Known Direct Subclasses
io.netty5.util.internal.shaded.org.jctools.queues.unpadded.MpscGrowableUnpaddedArrayQueue
Imports
io.netty5.util.internal.shaded.org.jctools.util.Pow2, .RangeUtil, io.netty5.util.internal.shaded.org.jctools.queues.*

Note

This class was automatically generated by io.netty5.util.internal.shaded.org.jctools.queues.unpadded.JavaParsingUnpaddedQueueGenerator which can found in the jctools-build module. The original source file is MpscChunkedArrayQueue.java. An MPSC 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

Inherited from io.netty5.util.internal.shaded.org.jctools.queues.unpadded.MpscChunkedUnpaddedArrayQueueColdProducerFields:
maxQueueCapacity

Constructor Summary

AccessConstructor and Description
public
public
MpscChunkedUnpaddedArrayQueue(int
the queue initial capacity. If chunk size is fixed this will be the chunk size. Must be 2 or more.
initialCapacity
,
int
the maximum capacity will be rounded up to the closest power of 2 and will be the upper limit of number of elements in this queue. Must be 4 or more and round up to a larger power of 2 than initialCapacity.
maxCapacity
)

Method Summary

Modifier and TypeMethod and Description
protected long
public int
protected long
protected int

Constructor Detail

MpscChunkedUnpaddedArrayQueueback to summary
public MpscChunkedUnpaddedArrayQueue(int maxCapacity)
MpscChunkedUnpaddedArrayQueueback to summary
public MpscChunkedUnpaddedArrayQueue(int initialCapacity, int maxCapacity)
Parameters
initialCapacity:int

the queue initial capacity. If chunk size is fixed this will be the chunk size. Must be 2 or more.

maxCapacity:int

the maximum capacity will be rounded up to the closest power of 2 and will be the upper limit of number of elements in this queue. Must be 4 or more and round up to a larger power of 2 than initialCapacity.

Method Detail

availableInQueueback to summary
protected long availableInQueue(long pIndex, long cIndex)

Implements abstract io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueue.availableInQueue.

Returns:long

Doc from io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueue.availableInQueue.

available elements in queue * 2

Annotations
@Override
capacityback to summary
public int capacity()

Implements abstract io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueue.capacity.

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

Returns:int

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

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

Annotations
@Override
getCurrentBufferCapacityback to summary
protected long getCurrentBufferCapacity(long mask)

Implements abstract io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueue.getCurrentBufferCapacity.

Returns:long

Doc from io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueue.getCurrentBufferCapacity.

current buffer capacity for elements (excluding next pointer and jump entry) * 2

Annotations
@Override
getNextBufferSizeback to summary
protected int getNextBufferSize(E[] buffer)

Implements abstract io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueue.getNextBufferSize.

Returns:int

Doc from io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueue.getNextBufferSize.

next buffer size(inclusive of next array pointer)

Annotations
@Override