Package org.apache.pekko.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 extendpekko.dispatch.ControlMessagewith priority.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Queue<Envelope>controlQueue()Envelopedequeue()Try to dequeue the next message from this queue, return null failing that.voidenqueue(ActorRef receiver, Envelope handle)Try to enqueue the message to this queue, or throw an exception.booleanhasMessages()Indicates whether this queue is non-empty.intnumberOfMessages()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 org.apache.pekko.dispatch.QueueBasedMessageQueue
cleanUp
-
-
-
-
Method Detail
-
controlQueue
java.util.Queue<Envelope> controlQueue()
-
dequeue
Envelope dequeue()
Description copied from interface:MessageQueueTry to dequeue the next message from this queue, return null failing that.- Specified by:
dequeuein interfaceMessageQueue
-
enqueue
void enqueue(ActorRef receiver, Envelope handle)
Description copied from interface:MessageQueueTry to enqueue the message to this queue, or throw an exception.- Specified by:
enqueuein interfaceMessageQueue
-
hasMessages
boolean hasMessages()
Description copied from interface:MessageQueueIndicates whether this queue is non-empty.- Specified by:
hasMessagesin interfaceMessageQueue- Specified by:
hasMessagesin interfaceQueueBasedMessageQueue
-
numberOfMessages
int numberOfMessages()
Description copied from interface:MessageQueueShould 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, usehasMessagesinstead.- Specified by:
numberOfMessagesin interfaceMessageQueue- Specified by:
numberOfMessagesin interfaceQueueBasedMessageQueue
-
queue
java.util.Queue<Envelope> queue()
- Specified by:
queuein interfaceQueueBasedMessageQueue
-
-