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

public Class MpscGrowableArrayQueue<E>

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

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.

Field Summary

Inherited from io.netty.util.internal.shaded.org.jctools.queues.MpscChunkedArrayQueue:
b000b001b002b003b004b005b006b007b010b011b012b013b014b015b016b017b020b021b022b023b024b025b026b027b030b031b032b033b034b035b036b037b040b041b042b043b044b045b046b047b050b051b052b053b054b055b056b057b060b061b062b063b064b065b066b067b070b071b072b073b074b075b076b077b100b101b102b103b104b105b106b107b110b111b112b113b114b115b116b117b120b121b122b123b124b125b126b127b130b131b132b133b134b135b136b137b140b141b142b143b144b145b146b147b150b151b152b153b154b155b156b157b160b161b162b163b164b165b166b167b170b171b172b173b174b175b176b177

Constructor Summary

AccessConstructor and Description
public
MpscGrowableArrayQueue(int maxCapacity)

public
MpscGrowableArrayQueue(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.netty.util.internal.shaded.org.jctools.queues.MpscChunkedArrayQueue:
availableInQueuecapacity

Constructor Detail

MpscGrowableArrayQueueback to summary
public MpscGrowableArrayQueue(int maxCapacity)
MpscGrowableArrayQueueback to summary
public MpscGrowableArrayQueue(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.netty.util.internal.shaded.org.jctools.queues.MpscChunkedArrayQueue.getCurrentBufferCapacity.

Returns:long

Doc from io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueue.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.netty.util.internal.shaded.org.jctools.queues.MpscChunkedArrayQueue.getNextBufferSize.

Returns:int

Doc from io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueue.getNextBufferSize.

next buffer size(inclusive of next array pointer)

Annotations
@Override