public final class QueueRingFixed<M> extends QueueRingBase<M>
| Constructor and Description |
|---|
QueueRingFixed(int capacity) |
QueueRingFixed(int capacity,
RingBlocker blocker) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeWrite() |
void |
deliver(ActorProcessor<? super M> deliver)
Deliver available messages to the delivery handler.
|
int |
getCapacity() |
long |
getHeadAlloc() |
long |
getTail() |
long |
getTailAlloc() |
M |
getValue(long ptr) |
long |
head() |
boolean |
isEmpty() |
boolean |
isWriteClosed() |
boolean |
offer(M value,
long timeout,
java.util.concurrent.TimeUnit unit)
Offer a new message to the queue.
|
M |
peek() |
M |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
pollWake() |
int |
remainingCapacity() |
void |
shutdown() |
int |
size() |
java.lang.String |
toString() |
void |
wake()
Wake the worker to process new messages.
|
add, addAll, clear, contains, containsAll, drainTo, drainTo, element, iterator, offer, poll, put, remove, remove, removeAll, retainAll, take, toArray, toArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic QueueRingFixed(int capacity)
public QueueRingFixed(int capacity,
RingBlocker blocker)
public int getCapacity()
public final boolean isEmpty()
isEmpty in interface java.util.Collection<M>isEmpty in class QueueRingBase<M>public final int size()
size in interface java.util.Collection<M>size in class QueueRingBase<M>public int remainingCapacity()
remainingCapacity in interface java.util.concurrent.BlockingQueue<M>remainingCapacity in class QueueRingBase<M>public final long head()
public final long getHeadAlloc()
public final long getTail()
public final long getTailAlloc()
public void wake()
QueueRingpublic final M getValue(long ptr)
public final boolean offer(M value, long timeout, java.util.concurrent.TimeUnit unit)
QueueRingwake() will be required because offer
does not automatically wake the consumerpublic final M poll(long timeout, java.util.concurrent.TimeUnit unit)
poll in interface java.util.concurrent.BlockingQueue<M>poll in class QueueRingBase<M>public final M peek()
peek in interface java.util.Queue<M>peek in class QueueRingBase<M>public void deliver(ActorProcessor<? super M> deliver) throws java.lang.Exception
QueueRingdeliver - handler to process the messagejava.lang.Exceptionpublic final boolean isWriteClosed()
public final void pollWake()
public final void closeWrite()
public final void shutdown()
public java.lang.String toString()
toString in class QueueRingBase<M>