E - public final class SpmcAtomicArrayQueue<E> extends AtomicReferenceArrayQueue<E> implements QueueProgressIndicators
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicLong |
consumerIndex |
private java.util.concurrent.atomic.AtomicLong |
producerIndex |
private java.util.concurrent.atomic.AtomicLong |
producerIndexCache |
buffer, mask| Constructor and Description |
|---|
SpmcAtomicArrayQueue(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
casHead(long expect,
long newValue) |
long |
currentConsumerIndex()
This method has no concurrent visibility semantics.
|
long |
currentProducerIndex()
This method has no concurrent visibility semantics.
|
boolean |
isEmpty() |
protected long |
lvConsumerIndex() |
protected long |
lvProducerIndex() |
protected long |
lvProducerIndexCache() |
boolean |
offer(E e) |
E |
peek() |
E |
poll() |
int |
size() |
protected void |
soTail(long v) |
protected void |
svProducerIndexCache(long v) |
calcElementOffset, calcElementOffset, clear, iterator, lpElement, lpElement, lvElement, lvElement, soElement, soElement, spElement, spElement, svElementcontains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprivate final java.util.concurrent.atomic.AtomicLong consumerIndex
private final java.util.concurrent.atomic.AtomicLong producerIndex
private final java.util.concurrent.atomic.AtomicLong producerIndexCache
public int size()
public boolean isEmpty()
public long currentProducerIndex()
QueueProgressIndicatorscurrentProducerIndex in interface QueueProgressIndicatorspublic long currentConsumerIndex()
QueueProgressIndicatorscurrentConsumerIndex in interface QueueProgressIndicatorsprotected final long lvProducerIndexCache()
protected final void svProducerIndexCache(long v)
protected final long lvConsumerIndex()
protected final boolean casHead(long expect,
long newValue)
protected final long lvProducerIndex()
protected final void soTail(long v)