Package rx.internal.util.atomic
Class AtomicReferenceArrayQueue<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
rx.internal.util.atomic.AtomicReferenceArrayQueue<E>
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,Queue<E>
- Direct Known Subclasses:
SpscAtomicArrayQueue
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final int
calcElementOffset
(long index) protected final int
calcElementOffset
(long index, int mask) void
clear()
iterator()
protected final E
lpElement
(int offset) protected final E
lpElement
(AtomicReferenceArray<E> buffer, int offset) protected final E
lvElement
(int offset) protected final E
lvElement
(AtomicReferenceArray<E> buffer, int offset) protected final void
protected final void
soElement
(AtomicReferenceArray<E> buffer, int offset, E value) protected final void
protected final void
spElement
(AtomicReferenceArray<E> buffer, int offset, E value) protected final void
svElement
(AtomicReferenceArray<E> buffer, int offset, E value) Methods inherited from class java.util.AbstractQueue
add, addAll, element, remove
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
Field Details
-
buffer
-
mask
protected final int mask
-
-
Constructor Details
-
AtomicReferenceArrayQueue
public AtomicReferenceArrayQueue(int capacity)
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceCollection<E>
- Specified by:
iterator
in interfaceIterable<E>
- Specified by:
iterator
in classAbstractCollection<E>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<E>
- Overrides:
clear
in classAbstractQueue<E>
-
calcElementOffset
protected final int calcElementOffset(long index, int mask) -
calcElementOffset
protected final int calcElementOffset(long index) -
lvElement
-
lpElement
-
lpElement
-
spElement
-
spElement
-
soElement
-
soElement
-
svElement
-
lvElement
-