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

public Class MpscGrowableUnpaddedArrayQueue<E>

extends MpscChunkedUnpaddedArrayQueue<E>
Class Inheritance
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 MpscGrowableArrayQueue.java. An MPSC array queue which starts at initialCapacity and grows to maxCapacity in linked chunks, doubling theirs size every time until the full blown backing array is used. 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.

Constructor Summary

AccessConstructor and Description
public
public
MpscGrowableUnpaddedArrayQueue(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
protected int
Inherited from io.netty5.util.internal.shaded.org.jctools.queues.unpadded.MpscChunkedUnpaddedArrayQueue:
availableInQueuecapacity

Constructor Detail

MpscGrowableUnpaddedArrayQueueback to summary
public MpscGrowableUnpaddedArrayQueue(int maxCapacity)
MpscGrowableUnpaddedArrayQueueback to summary
public MpscGrowableUnpaddedArrayQueue(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

getCurrentBufferCapacityback to summary
protected long getCurrentBufferCapacity(long mask)

Overrides io.netty5.util.internal.shaded.org.jctools.queues.unpadded.MpscChunkedUnpaddedArrayQueue.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)

Overrides io.netty5.util.internal.shaded.org.jctools.queues.unpadded.MpscChunkedUnpaddedArrayQueue.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