Class MpscIntrusiveLinkedQueue
java.lang.Object
org.jctools.queues.intrusive.MpscIntrusiveLinkedQueue
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleanisEmpty()protected final Nodeprotected final Nodeprotected final Nodebooleanpeek()poll()intsize()This is an O(n) operation as we run through all the nodes and count them.
The accuracy of the value returned by this method is subject to races with producer/consumer threads.protected final voidspConsumerNode(Node node) protected final NodexchgProducerNode(Node node)
-
Field Details
-
stub
-
-
Constructor Details
-
MpscIntrusiveLinkedQueue
public MpscIntrusiveLinkedQueue()
-
-
Method Details
-
offer
-
poll
-
peek
-
clear
public void clear() -
size
public int size()This is an O(n) operation as we run through all the nodes and count them.
The accuracy of the value returned by this method is subject to races with producer/consumer threads. In particular when racing with the consumer thread this method may under estimate the size.
Note that passing nodes between queues, or concurrent requeuing of nodes can cause this method to return strange values. -
isEmpty
public boolean isEmpty() -
spConsumerNode
-
lvConsumerNode
-
lpConsumerNode
-
lvProducerNode
-
xchgProducerNode
-