Package org.jctools.queues
Class MpscLinkedArrayQueue<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractQueue<T>
-
- org.jctools.queues.MpscLinkedArrayQueue<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.Queue<T>
public final class MpscLinkedArrayQueue<T> extends java.util.AbstractQueue<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
MpscLinkedArrayQueue.ARA2
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.Object
ALLOCATING
(package private) MpscLinkedArrayQueue.ARA2
consumerArray
(package private) java.util.concurrent.atomic.AtomicLong
consumerIndex
(package private) int
consumerOffset
(package private) int
maxOffset
(package private) java.util.concurrent.atomic.AtomicReference<MpscLinkedArrayQueue.ARA2>
producerArray
(package private) java.util.concurrent.atomic.AtomicLong
producerIndex
-
Constructor Summary
Constructors Constructor Description MpscLinkedArrayQueue(int arrayCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEmpty()
java.util.Iterator<T>
iterator()
boolean
offer(T value)
T
peek()
T
poll()
int
size()
T
weakPeek()
T
weakPoll()
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
producerIndex
final java.util.concurrent.atomic.AtomicLong producerIndex
-
producerArray
final java.util.concurrent.atomic.AtomicReference<MpscLinkedArrayQueue.ARA2> producerArray
-
consumerIndex
final java.util.concurrent.atomic.AtomicLong consumerIndex
-
consumerArray
MpscLinkedArrayQueue.ARA2 consumerArray
-
consumerOffset
int consumerOffset
-
maxOffset
final int maxOffset
-
ALLOCATING
static final java.lang.Object ALLOCATING
-
-