Additional top-level classes in compilation unit: BaseLinkedAtomicQueuePad0, BaseLinkedAtomicQueueProducerNodeRef, BaseLinkedAtomicQueuePad1, BaseLinkedAtomicQueueConsumerNodeRef, BaseLinkedAtomicQueuePad2.
Note
This class was automatically generated by io.netty.util.internal.shaded.org.jctools.queues.atomic.JavaParsingAtomicLinkedQueueGenerator which can found in the jctools-build module. The original source file is BaseLinkedQueue.java. A base data structure for concurrent linked queues. For convenience also pulled in common single consumer methods since at this time there's no plan to implement MC.
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public int | |
public int | drain(MessagePassingQueue.
Implements io. |
public int | drain(MessagePassingQueue.
Implements io. |
public void | drain(MessagePassingQueue.
Implements io. |
protected E | getSingleConsumerNodeValue(LinkedQueueAtomicNode<E> currConsumerNode, LinkedQueueAtomicNode<E> nextNode)
|
public boolean | isEmpty()
Overrides java. Implements io. |
public final Iterator | iterator()
Implements abstract java. Implements java. |
protected final LinkedQueueAtomicNode | |
protected final LinkedQueueAtomicNode | |
public E | peek()
Implements io. Queue#peek() interface.
|
public E | poll()
Implements io. Queue#poll() interface.
|
public boolean | relaxedOffer(E
not e)null , will throw NPE if it isImplements io. |
public E | relaxedPeek()
Implements io. |
public E | relaxedPoll()
Implements io. |
public final int | size()
Implements abstract java. Implements io. |
pack-priv LinkedQueueAtomicNode | |
public String | toString()
Overrides java. |
BaseLinkedAtomicQueue | back to summary |
---|---|
pack-priv BaseLinkedAtomicQueue() |
capacity | back to summary |
---|---|
public int capacity() Implements io.
|
drain | back to summary |
---|---|
public int drain(MessagePassingQueue. Implements io. Doc from io. Remove up to limit elements from the queue and hand to consume. This should be semantically similar to:
There's no strong commitment to the queue being empty at the end of a drain. Called from a consumer thread subject to the restrictions appropriate to the implementation. Warning Explicit assumptions are made with regards to
|
drain | back to summary |
---|---|
public int drain(MessagePassingQueue. Implements io. Doc from io. Remove all available item from the queue and hand to consume. This should be semantically similar to: M m; while((m = relaxedPoll()) != null){ c.accept(m); }There's no strong commitment to the queue being empty at the end of a drain. Called from a consumer thread subject to the restrictions appropriate to the implementation. Warning Explicit assumptions are made with regards to
|
drain | back to summary |
---|---|
public void drain(MessagePassingQueue. Implements io. Doc from io. Remove elements from the queue and hand to consume forever. Semantically similar to:
int idleCounter = 0; while (exit.keepRunning()) { E e = relaxedPoll(); if(e==null){ idleCounter = wait.idle(idleCounter); continue; } idleCounter = 0; c.accept(e); } Called from a consumer thread subject to the restrictions appropriate to the implementation. Warning Explicit assumptions are made with regards to
|
getSingleConsumerNodeValue | back to summary |
---|---|
protected E getSingleConsumerNodeValue(LinkedQueueAtomicNode<E> currConsumerNode, LinkedQueueAtomicNode<E> nextNode) |
isEmpty | back to summary |
---|---|
public boolean isEmpty() Overrides java. Implements io. Doc from io. This method's accuracy is subject to concurrent modifications happening as the observation is carried
out. Implementation Notes
|
iterator | back to summary |
---|---|
public final Iterator Implements abstract java. Implements java. Doc from java. Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned (unless this collection is an instance of some class that provides a guarantee). |
newNode | back to summary |
---|---|
protected final LinkedQueueAtomicNode |
newNode | back to summary |
---|---|
protected final LinkedQueueAtomicNode |
peek | back to summary |
---|---|
public E peek() Implements io. Doc from io. Called from the consumer thread subject to the restrictions appropriate to the implementation and
according to the
IMPLEMENTATION NOTES:
|
poll | back to summary |
---|---|
public E poll() Implements io. Doc from io. Called from the consumer thread subject to the restrictions appropriate to the implementation and
according to the
IMPLEMENTATION NOTES:
null , which is also the starting point for the queue.
Because null values are not allowed to be offered this is the only node with it's value set to
null at any one time.
|
relaxedOffer | back to summary |
---|---|
public boolean relaxedOffer(E e) Implements io. Doc from io. Called from a producer thread subject to the restrictions appropriate to the implementation. As opposed
to
|
relaxedPeek | back to summary |
---|---|
public E relaxedPeek() Implements io. Doc from io. Called from the consumer thread subject to the restrictions appropriate to the implementation. As
opposed to
|
relaxedPoll | back to summary |
---|---|
public E relaxedPoll() Implements io. Doc from io. Called from the consumer thread subject to the restrictions appropriate to the implementation. As
opposed to
|
size | back to summary |
---|---|
public final int size() Implements abstract java. Implements io. Doc from io. This method's accuracy is subject to concurrent modifications happening as the size is estimated and as
such is a best effort rather than absolute value. For some implementations this method may be O(n)
rather than O(1). Implementation Notes
|
spinWaitForNextNode | back to summary |
---|---|
pack-priv LinkedQueueAtomicNode |
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Returns a string representation of this collection. The string
representation consists of a list of the collection's elements in the
order they are returned by its iterator, enclosed in square brackets
( |