private static final class JCToolsBlockingQueueFactory.MpscBlockingQueue<E>
extends org.jctools.queues.MpscArrayQueue<E>
implements java.util.concurrent.BlockingQueue<E>
| Modifier and Type | Field and Description |
|---|---|
protected long |
consumerIndex |
private JCToolsBlockingQueueFactory.WaitStrategy |
waitStrategy |
| Constructor and Description |
|---|
MpscBlockingQueue(int capacity,
JCToolsBlockingQueueFactory.WaitStrategy waitStrategy) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
casProducerIndex(long arg0,
long arg1) |
int |
drainTo(java.util.Collection<? super E> c) |
int |
drainTo(java.util.Collection<? super E> c,
int maxElements) |
protected long |
lpConsumerIndex() |
protected long |
lvConsumerIndex() |
protected long |
lvProducerIndex() |
protected long |
lvProducerLimit() |
boolean |
offer(E e) |
boolean |
offer(E e,
long timeout,
java.util.concurrent.TimeUnit unit) |
E |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
put(E e) |
int |
remainingCapacity() |
protected void |
soConsumerIndex(long arg0) |
protected void |
soProducerLimit(long arg0) |
E |
take() |
currentConsumerIndex, currentProducerIndex, drain, drain, drain, failFastOffer, fill, fill, fill, isEmpty, offerIfBelowThreshold, peek, poll, relaxedOffer, relaxedPeek, relaxedPoll, sizecalcElementOffset, calcElementOffset, capacity, clear, iteratorcontains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprivate final JCToolsBlockingQueueFactory.WaitStrategy waitStrategy
protected long consumerIndex
MpscBlockingQueue(int capacity,
JCToolsBlockingQueueFactory.WaitStrategy waitStrategy)
public int drainTo(java.util.Collection<? super E> c)
drainTo in interface java.util.concurrent.BlockingQueue<E>public int drainTo(java.util.Collection<? super E> c, int maxElements)
drainTo in interface java.util.concurrent.BlockingQueue<E>public boolean offer(E e, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
offer in interface java.util.concurrent.BlockingQueue<E>java.lang.InterruptedExceptionpublic E poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
poll in interface java.util.concurrent.BlockingQueue<E>java.lang.InterruptedExceptionpublic void put(E e) throws java.lang.InterruptedException
put in interface java.util.concurrent.BlockingQueue<E>java.lang.InterruptedExceptionpublic boolean offer(E e)
public int remainingCapacity()
remainingCapacity in interface java.util.concurrent.BlockingQueue<E>public E take() throws java.lang.InterruptedException
take in interface java.util.concurrent.BlockingQueue<E>java.lang.InterruptedExceptionprotected final long lpConsumerIndex()
protected final long lvConsumerIndex()
protected void soConsumerIndex(long arg0)
protected final long lvProducerLimit()
protected final void soProducerLimit(long arg0)
protected final long lvProducerIndex()
protected final boolean casProducerIndex(long arg0,
long arg1)