Package akka.dispatch
Interface ControlAwareMessageQueueSemantics
-
- All Superinterfaces:
MessageQueue
,MultipleConsumerSemantics
,QueueBasedMessageQueue
- All Known Subinterfaces:
BoundedControlAwareMessageQueueSemantics
,UnboundedControlAwareMessageQueueSemantics
- All Known Implementing Classes:
BoundedControlAwareMailbox.MessageQueue
,UnboundedControlAwareMailbox.MessageQueue
public interface ControlAwareMessageQueueSemantics extends QueueBasedMessageQueue
ControlAwareMessageQueue handles messages that extendControlMessage
with priority.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Queue<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.java.util.Queue<Envelope>
queue()
-
Methods inherited from interface akka.dispatch.QueueBasedMessageQueue
cleanUp
-
-
-
-
Method Detail
-
controlQueue
java.util.Queue<Envelope> controlQueue()
-
dequeue
Envelope dequeue()
Description copied from interface:MessageQueue
Try to dequeue the next message from this queue, return null failing that.- Specified by:
dequeue
in interfaceMessageQueue
-
enqueue
void enqueue(ActorRef receiver, Envelope handle)
Description copied from interface:MessageQueue
Try to enqueue the message to this queue, or throw an exception.- Specified by:
enqueue
in interfaceMessageQueue
-
hasMessages
boolean hasMessages()
Description copied from interface:MessageQueue
Indicates whether this queue is non-empty.- Specified by:
hasMessages
in interfaceMessageQueue
- Specified by:
hasMessages
in interfaceQueueBasedMessageQueue
-
numberOfMessages
int numberOfMessages()
Description copied from interface:MessageQueue
Should return the current number of messages held in this queue; may always return 0 if no other value is available efficiently. Do not use this for testing for presence of messages, usehasMessages
instead.- Specified by:
numberOfMessages
in interfaceMessageQueue
- Specified by:
numberOfMessages
in interfaceQueueBasedMessageQueue
-
queue
java.util.Queue<Envelope> queue()
- Specified by:
queue
in interfaceQueueBasedMessageQueue
-
-