public interface MessageQueue
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.
|
void enqueue(ActorRef receiver, Envelope handle)
receiver
- (undocumented)handle
- (undocumented)Envelope dequeue()
int numberOfMessages()
hasMessages
instead.boolean hasMessages()
void cleanUp(ActorRef owner, MessageQueue deadLetters)
owner
- (undocumented)deadLetters
- (undocumented)