Package org.jctools.queues
Class MessagePassingQueueUtil
java.lang.Object
org.jctools.queues.MessagePassingQueueUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> int
drain
(MessagePassingQueue<E> queue, MessagePassingQueue.Consumer<E> c) static <E> int
drain
(MessagePassingQueue<E> queue, MessagePassingQueue.Consumer<E> c, int limit) static <E> void
drain
(MessagePassingQueue<E> queue, MessagePassingQueue.Consumer<E> c, MessagePassingQueue.WaitStrategy wait, MessagePassingQueue.ExitCondition exit) static <E> void
fill
(MessagePassingQueue<E> q, MessagePassingQueue.Supplier<E> s, MessagePassingQueue.WaitStrategy wait, MessagePassingQueue.ExitCondition exit) static <E> int
static <E> int
fillInBatchesToLimit
(MessagePassingQueue<E> q, MessagePassingQueue.Supplier<E> s, int batch, int limit) static <E> int
-
Constructor Details
-
MessagePassingQueueUtil
public MessagePassingQueueUtil()
-
-
Method Details
-
drain
public static <E> int drain(MessagePassingQueue<E> queue, MessagePassingQueue.Consumer<E> c, int limit) -
drain
-
drain
public static <E> void drain(MessagePassingQueue<E> queue, MessagePassingQueue.Consumer<E> c, MessagePassingQueue.WaitStrategy wait, MessagePassingQueue.ExitCondition exit) -
fill
public static <E> void fill(MessagePassingQueue<E> q, MessagePassingQueue.Supplier<E> s, MessagePassingQueue.WaitStrategy wait, MessagePassingQueue.ExitCondition exit) -
fillBounded
-
fillInBatchesToLimit
public static <E> int fillInBatchesToLimit(MessagePassingQueue<E> q, MessagePassingQueue.Supplier<E> s, int batch, int limit) -
fillUnbounded
-