public static class BoundedControlAwareMailbox.MessageQueue extends java.lang.Object implements BoundedControlAwareMessageQueueSemantics, java.io.Serializable
Constructor and Description |
---|
MessageQueue(int capacity,
scala.concurrent.duration.FiniteDuration pushTimeOut) |
Modifier and Type | Method and Description |
---|---|
int |
capacity() |
java.util.concurrent.ConcurrentLinkedQueue<Envelope> |
controlQueue() |
Envelope |
dequeue()
Try to dequeue the next message from this queue, return null failing that.
|
void |
enqueue(ActorRef receiver,
Envelope handle)
Try to enqueue the message to this queue, or throw an exception.
|
boolean |
hasMessages()
Indicates whether this queue is non-empty.
|
int |
numberOfMessages()
Should return the current number of messages held in this queue; may
always return 0 if no other value is available efficiently.
|
scala.concurrent.duration.FiniteDuration |
pushTimeOut() |
java.util.concurrent.ConcurrentLinkedQueue<Envelope> |
queue() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanUp
public MessageQueue(int capacity, scala.concurrent.duration.FiniteDuration pushTimeOut)
public int capacity()
public scala.concurrent.duration.FiniteDuration pushTimeOut()
pushTimeOut
in interface BoundedMessageQueueSemantics
public java.util.concurrent.ConcurrentLinkedQueue<Envelope> controlQueue()
controlQueue
in interface ControlAwareMessageQueueSemantics
public java.util.concurrent.ConcurrentLinkedQueue<Envelope> queue()
queue
in interface ControlAwareMessageQueueSemantics
queue
in interface QueueBasedMessageQueue
public void enqueue(ActorRef receiver, Envelope handle)
MessageQueue
enqueue
in interface ControlAwareMessageQueueSemantics
enqueue
in interface MessageQueue
receiver
- (undocumented)handle
- (undocumented)public int numberOfMessages()
MessageQueue
hasMessages
instead.numberOfMessages
in interface ControlAwareMessageQueueSemantics
numberOfMessages
in interface MessageQueue
numberOfMessages
in interface QueueBasedMessageQueue
public boolean hasMessages()
MessageQueue
hasMessages
in interface ControlAwareMessageQueueSemantics
hasMessages
in interface MessageQueue
hasMessages
in interface QueueBasedMessageQueue
public final Envelope dequeue()
MessageQueue
dequeue
in interface ControlAwareMessageQueueSemantics
dequeue
in interface MessageQueue