public class BlockingMpscQueue<T> extends org.jctools.queues.MpscArrayQueue<T> implements java.util.concurrent.BlockingQueue<T>, BatchedBlockingQueue<T>
| Modifier and Type | Field and Description |
|---|---|
protected long |
consumerIndex |
| Constructor and Description |
|---|
BlockingMpscQueue(int size) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
casProducerIndex(long arg0,
long arg1) |
int |
drainTo(java.util.Collection<? super T> c) |
int |
drainTo(java.util.Collection<? super T> c,
int maxElements) |
protected long |
lpConsumerIndex() |
long |
lvConsumerIndex() |
long |
lvProducerIndex() |
protected long |
lvProducerLimit() |
boolean |
offer(T e,
long timeout,
java.util.concurrent.TimeUnit unit) |
T |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
int |
pollAll(T[] array,
long timeout,
java.util.concurrent.TimeUnit unit)
Removes multiple items from the queue.
|
void |
put(T e) |
void |
putAll(T[] a,
int offset,
int len) |
int |
remainingCapacity() |
protected void |
soConsumerIndex(long arg0) |
protected void |
soProducerLimit(long arg0) |
T |
take() |
int |
takeAll(T[] array)
Drain the queue into an array.
|
drain, drain, drain, failFastOffer, fill, fill, fill, offer, offerIfBelowThreshold, peek, poll, relaxedOffer, relaxedPeek, relaxedPollcalcElementOffset, calcElementOffset, capacity, clear, currentConsumerIndex, currentProducerIndex, isEmpty, iterator, size, toStringcontains, containsAll, remove, removeAll, retainAll, toArray, toArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic void put(T e) throws java.lang.InterruptedException
put in interface java.util.concurrent.BlockingQueue<T>java.lang.InterruptedExceptionpublic boolean offer(T e, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
offer in interface java.util.concurrent.BlockingQueue<T>java.lang.InterruptedExceptionpublic T take() throws java.lang.InterruptedException
take in interface java.util.concurrent.BlockingQueue<T>java.lang.InterruptedExceptionpublic T poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
poll in interface java.util.concurrent.BlockingQueue<T>java.lang.InterruptedExceptionpublic int remainingCapacity()
remainingCapacity in interface java.util.concurrent.BlockingQueue<T>public int drainTo(java.util.Collection<? super T> c)
drainTo in interface java.util.concurrent.BlockingQueue<T>public int drainTo(java.util.Collection<? super T> c, int maxElements)
drainTo in interface java.util.concurrent.BlockingQueue<T>public void putAll(T[] a, int offset, int len) throws java.lang.InterruptedException
putAll in interface BatchedBlockingQueue<T>java.lang.InterruptedExceptionpublic int takeAll(T[] array) throws java.lang.InterruptedException
BatchedBlockingQueuetakeAll in interface BatchedBlockingQueue<T>java.lang.InterruptedExceptionpublic int pollAll(T[] array, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
BatchedBlockingQueuepollAll in interface BatchedBlockingQueue<T>java.lang.InterruptedExceptionprotected final long lpConsumerIndex()
public final long lvConsumerIndex()
protected void soConsumerIndex(long arg0)
protected final long lvProducerLimit()
protected final void soProducerLimit(long arg0)
public final long lvProducerIndex()
protected final boolean casProducerIndex(long arg0,
long arg1)
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.