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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, clear, contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArrayprotected 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–2023. All rights reserved.