Package org.jctools.queues
Class MpmcConcurrentQueueStateMarkers<E>
- java.lang.Object
-
- org.jctools.queues.MpmcConcurrentQueueStateMarkers<E>
-
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Queue<E>
public final class MpmcConcurrentQueueStateMarkers<E> extends Object implements Queue<E>
-
-
Field Summary
Fields Modifier and Type Field Description protected E[]bufferprotected intcapacityprotected longmaskprotected static intSIZE_OF_ELEMENT
-
Constructor Summary
Constructors Constructor Description MpmcConcurrentQueueStateMarkers(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(Collection<? extends E> c)protected longcalcOffset(long index)protected booleancasHead(long expect, long newValue)protected booleancasTail(long expect, long newValue)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)Eelement()booleanisEmpty()Iterator<E>iterator()protected ObjectlvElement(E[] buffer, long offset)protected longlvHead()protected longlvTail()booleanoffer(E e)Epeek()Epoll()Eremove()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()protected voidsoElement(E[] buffer, long offset, Object e)protected voidspElement(E[] buffer, long offset, E e)protected voidsvElement(E[] buffer, long offset, Object e)Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Method Detail
-
add
public boolean add(E e)
-
size
public int size()
- Specified by:
sizein interfaceCollection<E>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<E>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<E>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<E>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<E>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<E>
-
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAllin interfaceCollection<E>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<E>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<E>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<E>
-
lvHead
protected final long lvHead()
-
casHead
protected final boolean casHead(long expect, long newValue)
-
lvTail
protected final long lvTail()
-
casTail
protected final boolean casTail(long expect, long newValue)
-
calcOffset
protected final long calcOffset(long index)
-
spElement
protected final void spElement(E[] buffer, long offset, E e)
-
soElement
protected final void soElement(E[] buffer, long offset, Object e)
-
svElement
protected final void svElement(E[] buffer, long offset, Object e)
-
lvElement
protected final Object lvElement(E[] buffer, long offset)
-
-