public abstract class ConcurrentCircularArrayQueue<E>
extends java.util.AbstractQueue<E>
| Modifier and Type | Field and Description |
|---|---|
protected E[] |
buffer |
protected static int |
BUFFER_PAD |
protected int |
capacity |
protected long |
mask |
protected static int |
SPARSE_SHIFT |
| Constructor and Description |
|---|
ConcurrentCircularArrayQueue(ConcurrentCircularArrayQueue<E> c) |
ConcurrentCircularArrayQueue(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
calcOffset(long index) |
java.util.Iterator<E> |
iterator() |
protected E |
lpElement(E[] buffer,
long offset) |
protected E |
lpElement(long offset) |
protected E |
lvElement(E[] buffer,
long offset) |
protected E |
lvElement(long offset) |
boolean |
offer(E e) |
E |
peek() |
E |
poll() |
int |
size() |
protected void |
soElement(E[] buffer,
long offset,
E e) |
protected void |
soElement(long offset,
E e) |
protected void |
spElement(E[] buffer,
long offset,
E e) |
protected void |
spElement(long offset,
E e) |
protected void |
svElement(E[] buffer,
long offset,
E e) |
protected void |
svElement(long offset,
E e) |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringprotected static final int SPARSE_SHIFT
protected static final int BUFFER_PAD
protected final int capacity
protected final long mask
protected final E[] buffer
public ConcurrentCircularArrayQueue(int capacity)
public ConcurrentCircularArrayQueue(ConcurrentCircularArrayQueue<E> c)
protected final long calcOffset(long index)
protected final void spElement(long offset,
E e)
protected final void soElement(long offset,
E e)
protected final void svElement(long offset,
E e)
protected final E lpElement(long offset)
protected final E lvElement(long offset)
public boolean offer(E e)
public E poll()
public E peek()
public java.util.Iterator<E> iterator()