Additional top-level classes in compilation unit: SpscUnboundedArrayQueueProducerFields, SpscUnboundedArrayQueueProducerColdFields, SpscUnboundedArrayQueueL2Pad, SpscUnboundedArrayQueueConsumerColdField, SpscUnboundedArrayQueueConsumerField.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private static final Object | |
| pack-priv static final int | |
| private static final long | |
| private static final long | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private static long | |
| private static long | |
| public long | currentConsumerIndex()
Implements rx. |
| public long | currentProducerIndex()
Implements rx. |
| public final Iterator | iterator()
Implements abstract java. Implements java. |
| private long | |
| private static <E> Object | |
| private E[] | |
| private long | |
| private E | |
| private E | |
| public final boolean | offer(final E
the element to add e)Implements java. |
| public final E | peek()
Implements java. null if this queue is empty.
|
| public final E | poll()
Implements java. null if this queue is empty.
|
| private void | |
| public final int | size()
Implements abstract java. Implements java. |
| private void | |
| private static void | |
| private void | |
| private void | |
| private boolean |
| C_INDEX_OFFSET | back to summary |
|---|---|
| private static final long C_INDEX_OFFSET | |
| HAS_NEXT | back to summary |
|---|---|
| private static final Object HAS_NEXT | |
| MAX_LOOK_AHEAD_STEP | back to summary |
|---|---|
| pack-priv static final int MAX_LOOK_AHEAD_STEP | |
| P_INDEX_OFFSET | back to summary |
|---|---|
| private static final long P_INDEX_OFFSET | |
| REF_ARRAY_BASE | back to summary |
|---|---|
| private static final long REF_ARRAY_BASE | |
| REF_ELEMENT_SHIFT | back to summary |
|---|---|
| private static final int REF_ELEMENT_SHIFT | |
| SpscUnboundedArrayQueue | back to summary |
|---|---|
public SpscUnboundedArrayQueue(final int bufferSize)
| |
| adjustLookAheadStep | back to summary |
|---|---|
| private void adjustLookAheadStep(int capacity) | |
| calcDirectOffset | back to summary |
|---|---|
| private static long calcDirectOffset(long index) | |
| calcWrappedOffset | back to summary |
|---|---|
| private static long calcWrappedOffset(long index, long mask) | |
| currentConsumerIndex | back to summary |
|---|---|
| public long currentConsumerIndex() Implements rx. Doc from rx. This method has no concurrent visibility semantics. The value returned may be negative. Under normal
circumstances 2 consecutive calls to this method can offer an idea of progress made by consumer threads
by subtracting the 2 results though in extreme cases (if consumers have progressed by more than 2^64)
this may also fail.
| |
| currentProducerIndex | back to summary |
|---|---|
| public long currentProducerIndex() Implements rx. Doc from rx. This method has no concurrent visibility semantics. The value returned may be negative. Under normal
circumstances 2 consecutive calls to this method can offer an idea of progress made by producer threads
by subtracting the 2 results though in extreme cases (if producers have progressed by more than 2^64)
this may also fail.
| |
| 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 |
|---|---|
| private long lvConsumerIndex() | |
| lvElement | back to summary |
|---|---|
| private static <E> Object lvElement(E[] buffer, long offset) | |
| lvNext | back to summary |
|---|---|
private E[] lvNext(E[] curr)
| |
| lvProducerIndex | back to summary |
|---|---|
| private long lvProducerIndex() | |
| newBufferPeek | back to summary |
|---|---|
private E newBufferPeek(E[] nextBuffer, final long index, final long mask)
| |
| newBufferPoll | back to summary |
|---|---|
private E newBufferPoll(E[] nextBuffer, final long index, final long mask)
| |
| offer | back to summary |
|---|---|
| public final 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 This implementation is correct for single producer thread use only.
| |
| peek | back to summary |
|---|---|
| public final 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 final 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.
| |
| resize | back to summary |
|---|---|
private void resize(final E[] oldBuffer, final long currIndex, final long offset, final E e, final long mask)
| |
| 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 |
|---|---|
| private void soConsumerIndex(long v) | |
| soElement | back to summary |
|---|---|
| private static void soElement(Object[] buffer, long offset, Object e) | |
| soNext | back to summary |
|---|---|
| private void soNext(E[] curr, E[] next) | |
| soProducerIndex | back to summary |
|---|---|
| private void soProducerIndex(long v) | |
| writeToQueue | back to summary |
|---|---|
| private boolean writeToQueue(final E[] buffer, final E e, final long index, final long offset) | |