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

public Class SpscGrowableUnpaddedArrayQueue<E>

extends BaseSpscLinkedUnpaddedArrayQueue<E>
Class Inheritance
Imports
io.netty5.util.internal.shaded.org.jctools.util.Pow2, .RangeUtil, .SpscLookAheadUtil, 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 SpscGrowableArrayQueue.java. An SPSC 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

Modifier and TypeField and Description
private long
private final int

Constructor Summary

AccessConstructor and Description
public
SpscGrowableUnpaddedArrayQueue(final int capacity)

public
SpscGrowableUnpaddedArrayQueue(final int chunkSize, final int capacity)

Method Summary

Modifier and TypeMethod and Description
private void
adjustLookAheadStep(int capacity)

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

Implements abstract io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseSpscLinkedUnpaddedArrayQueue.offerColdPath.

Inherited from io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseSpscLinkedUnpaddedArrayQueue:
currentConsumerIndexcurrentProducerIndexdraindraindrainfillfillfillisEmptyiteratorlinkOldToNewlvNextArrayAndUnlinkofferpeekpollrelaxedOfferrelaxedPeekrelaxedPollsizesoNexttoStringwriteToQueue

Field Detail

lookAheadStepback to summary
private long lookAheadStep
maxQueueCapacityback to summary
private final int maxQueueCapacity

Constructor Detail

SpscGrowableUnpaddedArrayQueueback to summary
public SpscGrowableUnpaddedArrayQueue(final int capacity)
SpscGrowableUnpaddedArrayQueueback to summary
public SpscGrowableUnpaddedArrayQueue(final int chunkSize, final int capacity)

Method Detail

adjustLookAheadStepback to summary
private void adjustLookAheadStep(int capacity)
capacityback to summary
public int 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
offerColdPathback to summary
pack-priv final boolean offerColdPath(final E[] buffer, final long mask, final long index, final long offset, final E v, final MessagePassingQueue.Supplier<? extends E> s)

Implements abstract io.netty5.util.internal.shaded.org.jctools.queues.unpadded.BaseSpscLinkedUnpaddedArrayQueue.offerColdPath.

Annotations
@Override