public final class SpmcArrayQueue<E> extends ConcurrentCircularArrayQueue<E> implements java.util.Queue<E>
| Modifier and Type | Field and Description |
|---|---|
protected static long |
HEAD_OFFSET |
protected static long |
TAIL_OFFSET |
buffer, BUFFER_PAD, capacity, mask, SPARSE_SHIFT| Constructor and Description |
|---|
SpmcArrayQueue(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
casHead(long expect,
long newValue) |
protected long |
lvHead() |
protected long |
lvTail() |
protected long |
lvTailCache() |
boolean |
offer(E e) |
E |
peek() |
E |
poll() |
int |
size() |
protected void |
soTail(long v) |
protected void |
svTailCache(long v) |
calcOffset, iterator, lpElement, lpElement, lvElement, lvElement, soElement, soElement, spElement, spElement, svElement, svElementcontains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringprotected static final long HEAD_OFFSET
protected static final long TAIL_OFFSET
public boolean offer(E e)
offer in interface java.util.Queue<E>offer in class ConcurrentCircularArrayQueue<E>public E poll()
poll in interface java.util.Queue<E>poll in class ConcurrentCircularArrayQueue<E>public E peek()
peek in interface java.util.Queue<E>peek in class ConcurrentCircularArrayQueue<E>public int size()
size in interface java.util.Collection<E>size in class ConcurrentCircularArrayQueue<E>protected final long lvTailCache()
protected final void svTailCache(long v)
protected final long lvHead()
protected final boolean casHead(long expect,
long newValue)
protected final long lvTail()
protected final void soTail(long v)