public class NodeMessageQueue extends AbstractNodeQueue<Envelope> implements MessageQueue, UnboundedMessageQueueSemantics
AbstractNodeQueue.Node<T>
Constructor and Description |
---|
NodeMessageQueue() |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp(ActorRef owner,
MessageQueue deadLetters)
Called when the mailbox this queue belongs to is disposed of.
|
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.
|
add, addNode, count, isEmpty, peek, peekNode, poll, pollNode
public final void enqueue(ActorRef receiver, Envelope handle)
MessageQueue
enqueue
in interface MessageQueue
receiver
- (undocumented)handle
- (undocumented)public final Envelope dequeue()
MessageQueue
dequeue
in interface MessageQueue
public final int numberOfMessages()
MessageQueue
hasMessages
instead.numberOfMessages
in interface MessageQueue
public final boolean hasMessages()
MessageQueue
hasMessages
in interface MessageQueue
public final void cleanUp(ActorRef owner, MessageQueue deadLetters)
MessageQueue
cleanUp
in interface MessageQueue
owner
- (undocumented)deadLetters
- (undocumented)