abstract class BaseSpscLinkedArrayQueue<E> extends BaseSpscLinkedArrayQueueProducerColdFields<E> implements QueueProgressIndicators, IndexedQueueSizeUtil.IndexedQueue
Modifier and Type | Field and Description |
---|---|
private static long |
C_INDEX_OFFSET |
protected static java.lang.Object |
JUMP |
private static long |
P_INDEX_OFFSET |
producerBuffer, producerBufferLimit, producerMask
producerIndex
p0, p1, p10, p11, p12, p13, p14, p15, p16, p17, p2, p3, p4, p5, p6, p7
consumerIndex
consumerBuffer, consumerMask
Constructor and Description |
---|
BaseSpscLinkedArrayQueue() |
Modifier and Type | Method and Description |
---|---|
long |
currentConsumerIndex()
This method has no concurrent visibility semantics.
|
long |
currentProducerIndex()
This method has no concurrent visibility semantics.
|
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
protected void |
linkOldToNew(long currIndex,
E[] oldBuffer,
long offset,
E[] newBuffer,
long offsetInNew,
E e) |
long |
lvConsumerIndex() |
protected E[] |
lvNextArrayAndUnlink(E[] curr) |
long |
lvProducerIndex() |
private E |
newBufferPeek(E[] buffer,
long index) |
private E |
newBufferPoll(E[] buffer,
long index) |
private long |
nextArrayOffset(E[] curr) |
boolean |
offer(E e) |
protected abstract boolean |
offerColdPath(E[] buffer,
long mask,
E e,
long pIndex,
long offset) |
E |
peek() |
E |
poll() |
int |
size() |
protected void |
soConsumerIndex(long v) |
protected void |
soNext(E[] curr,
E[] next) |
protected void |
soProducerIndex(long v) |
java.lang.String |
toString() |
protected void |
writeToQueue(E[] buffer,
E e,
long index,
long offset) |
contains, containsAll, remove, removeAll, retainAll, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected static final java.lang.Object JUMP
private static final long P_INDEX_OFFSET
private static final long C_INDEX_OFFSET
protected final void soProducerIndex(long v)
protected final void soConsumerIndex(long v)
public final long lvProducerIndex()
lvProducerIndex
in interface IndexedQueueSizeUtil.IndexedQueue
public final long lvConsumerIndex()
lvConsumerIndex
in interface IndexedQueueSizeUtil.IndexedQueue
public final java.util.Iterator<E> iterator()
public java.lang.String toString()
toString
in class java.util.AbstractCollection<E>
public long currentProducerIndex()
QueueProgressIndicators
currentProducerIndex
in interface QueueProgressIndicators
public long currentConsumerIndex()
QueueProgressIndicators
currentConsumerIndex
in interface QueueProgressIndicators
private long nextArrayOffset(E[] curr)
public boolean offer(E e)
This implementation is correct for single producer thread use only.
offer
in interface java.util.Queue<E>
protected abstract boolean offerColdPath(E[] buffer, long mask, E e, long pIndex, long offset)
protected final void linkOldToNew(long currIndex, E[] oldBuffer, long offset, E[] newBuffer, long offsetInNew, E e)
public E poll()
This implementation is correct for single consumer thread use only.
poll
in interface java.util.Queue<E>
public E peek()
This implementation is correct for single consumer thread use only.
peek
in interface java.util.Queue<E>
public final int size()