Class Recycler.BlockingMessageQueue<T>
java.lang.Object
io.netty.util.Recycler.BlockingMessageQueue<T>
- All Implemented Interfaces:
org.jctools.queues.MessagePassingQueue<T>
private static final class Recycler.BlockingMessageQueue<T>
extends Object
implements org.jctools.queues.MessagePassingQueue<T>
This is an implementation of
MessagePassingQueue, similar to what might be returned from
PlatformDependent.newMpscQueue(int), but intended to be used for debugging purpose.
The implementation relies on synchronised monitor locks for thread-safety.
The fill bulk operation is not supported by this implementation.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jctools.queues.MessagePassingQueue
org.jctools.queues.MessagePassingQueue.Consumer<T>, org.jctools.queues.MessagePassingQueue.ExitCondition, org.jctools.queues.MessagePassingQueue.Supplier<T>, org.jctools.queues.MessagePassingQueue.WaitStrategy -
Field Summary
FieldsFields inherited from interface org.jctools.queues.MessagePassingQueue
UNBOUNDED_CAPACITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcapacity()voidclear()intintvoiddrain(org.jctools.queues.MessagePassingQueue.Consumer<T> c, org.jctools.queues.MessagePassingQueue.WaitStrategy wait, org.jctools.queues.MessagePassingQueue.ExitCondition exit) intintvoidfill(org.jctools.queues.MessagePassingQueue.Supplier<T> s, org.jctools.queues.MessagePassingQueue.WaitStrategy wait, org.jctools.queues.MessagePassingQueue.ExitCondition exit) booleanisEmpty()booleanpeek()poll()booleanrelaxedOffer(T e) intsize()
-
Field Details
-
deque
-
maxCapacity
private final int maxCapacity
-
-
Constructor Details
-
BlockingMessageQueue
BlockingMessageQueue(int maxCapacity)
-
-
Method Details
-
offer
-
poll
-
peek
-
size
public int size()- Specified by:
sizein interfaceorg.jctools.queues.MessagePassingQueue<T>
-
clear
public void clear()- Specified by:
clearin interfaceorg.jctools.queues.MessagePassingQueue<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceorg.jctools.queues.MessagePassingQueue<T>
-
capacity
public int capacity()- Specified by:
capacityin interfaceorg.jctools.queues.MessagePassingQueue<T>
-
relaxedOffer
-
relaxedPoll
-
relaxedPeek
-
drain
-
fill
-
drain
-
fill
-
drain
-
fill
-