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

public Class SpscGrowableAtomicArrayQueue<E>

extends BaseSpscLinkedAtomicArrayQueue<E>
Class Inheritance
Imports
io.netty.util.internal.shaded.org.jctools.util.Pow2, .RangeUtil, java.util.concurrent.atomic.AtomicReferenceFieldUpdater, .AtomicLongFieldUpdater, .AtomicReferenceArray, io.netty.util.internal.shaded.org.jctools.queues.MessagePassingQueue, .MessagePassingQueue.Supplier, .MessagePassingQueueUtil, .QueueProgressIndicators, .IndexedQueueSizeUtil

Note

This class was automatically generated by io.netty.util.internal.shaded.org.jctools.queues.atomic.JavaParsingAtomicLinkedQueueGenerator 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
SpscGrowableAtomicArrayQueue(final int capacity)

public
SpscGrowableAtomicArrayQueue(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 AtomicReferenceArray<E> buffer, final long mask, final long index, final int offset, final E v, final MessagePassingQueue.Supplier<? extends E> s)

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

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

Field Detail

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

Constructor Detail

SpscGrowableAtomicArrayQueueback to summary
public SpscGrowableAtomicArrayQueue(final int capacity)
SpscGrowableAtomicArrayQueueback to summary
public SpscGrowableAtomicArrayQueue(final int chunkSize, final int capacity)

Method Detail

adjustLookAheadStepback to summary
private void adjustLookAheadStep(int capacity)
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(final AtomicReferenceArray<E> buffer, final long mask, final long index, final int offset, final E v, final MessagePassingQueue.Supplier<? extends E> s)

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

Annotations
@Override