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
ControlAwareMessageQueue handles messages that extend
pekko.dispatch.ControlMessage with priority.-
Method Summary
Modifier and TypeMethodDescriptiondequeue()Try to dequeue the next message from this queue, return null failing that.voidTry to enqueue the message to this queue, or throw an exception.booleanIndicates whether this queue is non-empty.intShould return the current number of messages held in this queue; may always return 0 if no other value is available efficiently.queue()Methods inherited from interface org.apache.pekko.dispatch.QueueBasedMessageQueue
cleanUp
-
Method Details
-
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
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
- Specified by:
queuein interfaceQueueBasedMessageQueue
-