akka.dispatch
Class AbstractNodeQueue<T>
java.lang.Object
java.util.concurrent.atomic.AtomicReference<AbstractNodeQueue.Node<T>>
akka.dispatch.AbstractNodeQueue<T>
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- NodeMessageQueue
public abstract class AbstractNodeQueue<T>
- extends java.util.concurrent.atomic.AtomicReference<AbstractNodeQueue.Node<T>>
Lock-free MPSC linked queue implementation based on Dmitriy Vyukov's non-intrusive MPSC queue:
http://www.1024cores.net/home/lock-free-algorithms/queues/non-intrusive-mpsc-node-based-queue
- See Also:
- Serialized Form
Methods inherited from class java.util.concurrent.atomic.AtomicReference |
compareAndSet, get, getAndSet, lazySet, set, toString, weakCompareAndSet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractNodeQueue
protected AbstractNodeQueue()
peekNode
protected final AbstractNodeQueue.Node<T> peekNode()
peek
public final T peek()
add
public final void add(T value)
addNode
public final void addNode(AbstractNodeQueue.Node<T> n)
isEmpty
public final boolean isEmpty()
count
public final int count()
poll
public final T poll()
pollNode
public final AbstractNodeQueue.Node<T> pollNode()