public final class SpmcArrayQueue<E> extends ConcurrentCircularArrayQueue<E>
| Modifier and Type | Field and Description |
|---|---|
protected static long |
C_INDEX_OFFSET |
protected static long |
P_INDEX_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) |
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, clear, iterator, lpElement, lpElement, lvElement, lvElement, soElement, soElement, spElement, spElementadd, addAll, element, removecontains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArrayprotected static final long C_INDEX_OFFSET
protected static final long P_INDEX_OFFSET
public boolean offer(E e)
public E poll()
public E peek()
public int size()
size in interface Collection<E>size in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in class AbstractCollection<E>protected 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)
Copyright © 2013–2014. All rights reserved.