public final class InlinedCountersSpscConcurrentArrayQueue<E> extends InlinedRingBufferL3Pad<E> implements java.util.Queue<E>
Modifier and Type | Field and Description |
---|---|
private static long |
ARRAY_BASE |
private static int |
ELEMENT_SHIFT |
private static long |
HEAD_OFFSET |
private static long |
TAIL_OFFSET |
p00, p01, p02, p03, p04, p05, p06, p07, p50, p51, p52, p53, p54, p55, p56
head, tailCache
p30, p31, p32, p33, p34, p35, p36
headCache, tail
p10, p11, p12, p13, p14, p15, p16
buffer, BUFFER_PAD, capacity, mask, SPARSE_SHIFT
p17
Constructor and Description |
---|
InlinedCountersSpscConcurrentArrayQueue(int capacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
boolean |
addAll(java.util.Collection<? extends E> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
E |
element() |
private E |
getElement(long index) |
private long |
getHead() |
private long |
getTail() |
private void |
headLazySet(long v) |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
boolean |
offer(E e) |
private long |
offset(long index) |
E |
peek() |
E |
poll() |
E |
remove() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
private void |
tailLazySet(long v) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
private static final long TAIL_OFFSET
private static final long HEAD_OFFSET
private static final long ARRAY_BASE
private static final int ELEMENT_SHIFT
public InlinedCountersSpscConcurrentArrayQueue(int capacity)
private void headLazySet(long v)
private long getHead()
private void tailLazySet(long v)
private long getTail()
public boolean add(E e)
private long offset(long index)
private E getElement(long index)
public int size()
size
in interface java.util.Collection<E>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<E>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<E>
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<E>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<E>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<E>
public boolean addAll(java.util.Collection<? extends E> c)
addAll
in interface java.util.Collection<E>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<E>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<E>
public void clear()
clear
in interface java.util.Collection<E>