Located in compilation unit of com.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final VarHandle | |
| private static final Object | |
| pack-priv static final VarHandle | |
| pack-priv static final VarHandle | |
| pack-priv static final VarHandle |
| Access | Constructor and Description |
|---|---|
| pack-priv | BaseMpscLinkedArrayQueue(final int
the queue initial capacity. If chunk size is fixed this will be the
chunk size. Must be 2 or more. initialCapacity)
|
| Modifier and Type | Method and Description |
|---|---|
| public static <E> E[] | |
| protected abstract long | |
| public abstract int | |
| pack-priv static boolean | |
| pack-priv static boolean | |
| public long | |
| public long | |
| protected abstract long | Returns: current buffer capacity for elements (excluding next pointer and jump entry) * 2
|
| private E[] | |
| protected abstract int | |
| public final boolean | isEmpty()
Overrides java. Implements java. true if this collection contains no elements.
|
| public final Iterator | iterator()
Implements abstract java. Implements java. |
| pack-priv static long | |
| pack-priv static <E> E | Returns: the element at the offsetthis.buffer buffer, long computed offset)A volatile load (load + LoadLoad barrier) of an element from a given offset. |
| pack-priv static long | |
| private long | |
| pack-priv static long | modifiedCalcElementOffset(long index, long mask)
This method assumes index is actually (index << 1) because lower bit is used for resize. |
| private long | |
| private E | |
| private E | |
| private long | |
| public boolean | offer(final E
the element to add e)Implements java. |
| private int | offerSlowPath(long mask, long pIndex, long producerLimit)
We do not inline resize into this method because we do not resize on fill. |
| public E | peek()
Implements java. null if this queue is empty.
|
| public E | poll()
Implements java. null if this queue is empty.
|
| public boolean | |
| public E | |
| public E | |
| private void | |
| public final int | size()
Implements abstract java. Implements java. |
| pack-priv static void | |
| pack-priv static <E> void | soElement(E[]
this.buffer buffer, long computed offset, E an orderly kitty e)An ordered store(store + StoreStore barrier) of an element to a given offset |
| pack-priv static void | |
| pack-priv static void | |
| public String | toString()
Overrides java. |
| C_INDEX | back to summary |
|---|---|
| pack-priv static final VarHandle C_INDEX | |
| JUMP | back to summary |
|---|---|
| private static final Object JUMP | |
| P_INDEX | back to summary |
|---|---|
| pack-priv static final VarHandle P_INDEX | |
| P_LIMIT | back to summary |
|---|---|
| pack-priv static final VarHandle P_LIMIT | |
| REF_ARRAY | back to summary |
|---|---|
| pack-priv static final VarHandle REF_ARRAY | |
| BaseMpscLinkedArrayQueue | back to summary |
|---|---|
pack-priv BaseMpscLinkedArrayQueue(final int initialCapacity)
| |
| allocate | back to summary |
|---|---|
public static <E> E[] allocate(int capacity)
| |
| availableInQueue | back to summary |
|---|---|
protected abstract long availableInQueue(long pIndex, final long cIndex)
| |
| capacity | back to summary |
|---|---|
| public abstract int capacity() | |
| casProducerIndex | back to summary |
|---|---|
| pack-priv static boolean casProducerIndex(BaseMpscLinkedArrayQueue<?> self, long expect, long newValue) | |
| casProducerLimit | back to summary |
|---|---|
| pack-priv static boolean casProducerLimit(BaseMpscLinkedArrayQueue<?> self, long expect, long newValue) | |
| currentConsumerIndex | back to summary |
|---|---|
| public long currentConsumerIndex() | |
| currentProducerIndex | back to summary |
|---|---|
| public long currentProducerIndex() | |
| getCurrentBufferCapacity | back to summary |
|---|---|
protected abstract long getCurrentBufferCapacity(long mask)
| |
| getNextBuffer | back to summary |
|---|---|
private E[] getNextBuffer(final E[] buffer, final long mask)
| |
| getNextBufferSize | back to summary |
|---|---|
protected abstract int getNextBufferSize(E[] buffer)
| |
| isEmpty | back to summary |
|---|---|
| public final boolean isEmpty() Overrides java. Implements java. Doc from java. Returns
| |
| iterator | back to summary |
|---|---|
| public final Iterator Implements abstract java. Implements java. Doc from java. Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned (unless this collection is an instance of some class that provides a guarantee). | |
| lvConsumerIndex | back to summary |
|---|---|
| pack-priv static long lvConsumerIndex(BaseMpscLinkedArrayQueue<?> self) | |
| lvElement | back to summary |
|---|---|
| pack-priv static <E> E lvElement(E[] buffer, long offset) A volatile load (load + LoadLoad barrier) of an element from a given offset.
| |
| lvProducerIndex | back to summary |
|---|---|
| pack-priv static long lvProducerIndex(BaseMpscLinkedArrayQueue<?> self) | |
| lvProducerLimit | back to summary |
|---|---|
| private long lvProducerLimit() | |
| modifiedCalcElementOffset | back to summary |
|---|---|
| pack-priv static long modifiedCalcElementOffset(long index, long mask) This method assumes index is actually (index << 1) because lower bit is used for resize. This is compensated for by reducing the element shift. The computation is constant folded, so there's no cost. | |
| newBufferAndOffset | back to summary |
|---|---|
| private long newBufferAndOffset(E[] nextBuffer, final long index) | |
| newBufferPeek | back to summary |
|---|---|
| private E newBufferPeek(E[] nextBuffer, final long index) | |
| newBufferPoll | back to summary |
|---|---|
| private E newBufferPoll(E[] nextBuffer, final long index) | |
| nextArrayOffset | back to summary |
|---|---|
| private long nextArrayOffset(final long mask) | |
| offer | back to summary |
|---|---|
| public boolean offer(final E e) Implements java. Doc from java. Inserts the specified element into this queue if it is possible to do
so immediately without violating capacity restrictions.
When using a capacity-restricted queue, this method is generally
preferable to
| |
| offerSlowPath | back to summary |
|---|---|
| private int offerSlowPath(long mask, long pIndex, long producerLimit) We do not inline resize into this method because we do not resize on fill. | |
| peek | back to summary |
|---|---|
| public E peek() Implements java. Doc from java. Retrieves, but does not remove, the head of this queue,
or returns This implementation is correct for single consumer thread use only.
| |
| poll | back to summary |
|---|---|
| public E poll() Implements java. Doc from java. Retrieves and removes the head of this queue,
or returns This implementation is correct for single consumer thread use only.
| |
| relaxedOffer | back to summary |
|---|---|
| public boolean relaxedOffer(E e) | |
| relaxedPeek | back to summary |
|---|---|
public E relaxedPeek()
| |
| relaxedPoll | back to summary |
|---|---|
public E relaxedPoll()
| |
| resize | back to summary |
|---|---|
| private void resize(long oldMask, E[] oldBuffer, long pIndex, final E e) | |
| size | back to summary |
|---|---|
| public final int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this collection. If this collection
contains more than
| |
| soConsumerIndex | back to summary |
|---|---|
| pack-priv static void soConsumerIndex(BaseMpscLinkedArrayQueue<?> self, long v) | |
| soElement | back to summary |
|---|---|
| pack-priv static <E> void soElement(E[] buffer, long offset, E e) An ordered store(store + StoreStore barrier) of an element to a given offset
| |
| soProducerIndex | back to summary |
|---|---|
| pack-priv static void soProducerIndex(BaseMpscLinkedArrayQueue<?> self, long v) | |
| soProducerLimit | back to summary |
|---|---|
| pack-priv static void soProducerLimit(BaseMpscLinkedArrayQueue<?> self, long v) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of this collection. The string
representation consists of a list of the collection's elements in the
order they are returned by its iterator, enclosed in square brackets
( | |