public final class MpscOnSpscQueue<E> extends AbstractQueue<E> implements Queue<E>
Modifier and Type | Field and Description |
---|---|
protected ThreadLocal<Queue<E>> |
producerQueue |
protected Queue<E>[] |
queues |
Constructor and Description |
---|
MpscOnSpscQueue(int capacity) |
Modifier and Type | Method and Description |
---|---|
protected void |
addQueue(Queue<E> q) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
offer(E e) |
E |
peek() |
E |
poll() |
protected void |
removeQueue(Object q) |
int |
size() |
contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAll, clear, contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
protected final ThreadLocal<Queue<E>> producerQueue
protected volatile Queue<E>[] queues
public int size()
size
in interface Collection<E>
size
in class AbstractCollection<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in class AbstractCollection<E>
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in class AbstractCollection<E>
protected final void addQueue(Queue<E> q)
protected final void removeQueue(Object q)
Copyright © 2013–2017. All rights reserved.