Package org.apache.pekko.dispatch
Class BoundedControlAwareMailbox.MessageQueue
java.lang.Object
org.apache.pekko.dispatch.BoundedControlAwareMailbox.MessageQueue
- All Implemented Interfaces:
- Serializable,- BoundedControlAwareMessageQueueSemantics,- BoundedMessageQueueSemantics,- ControlAwareMessageQueueSemantics,- MessageQueue,- MultipleConsumerSemantics,- QueueBasedMessageQueue
- Enclosing class:
- BoundedControlAwareMailbox
public static class BoundedControlAwareMailbox.MessageQueue
extends Object
implements BoundedControlAwareMessageQueueSemantics, Serializable
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionMessageQueue(int capacity, scala.concurrent.duration.FiniteDuration pushTimeOut) 
- 
Method SummaryModifier and TypeMethodDescriptionintcapacity()final Envelopedequeue()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.scala.concurrent.duration.FiniteDurationqueue()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.dispatch.QueueBasedMessageQueuecleanUp
- 
Constructor Details- 
MessageQueuepublic MessageQueue(int capacity, scala.concurrent.duration.FiniteDuration pushTimeOut) 
 
- 
- 
Method Details- 
capacitypublic int capacity()
- 
controlQueue- Specified by:
- controlQueuein interface- ControlAwareMessageQueueSemantics
 
- 
dequeueDescription copied from interface:MessageQueueTry to dequeue the next message from this queue, return null failing that.- Specified by:
- dequeuein interface- ControlAwareMessageQueueSemantics
- Specified by:
- dequeuein interface- MessageQueue
 
- 
enqueueDescription copied from interface:MessageQueueTry to enqueue the message to this queue, or throw an exception.- Specified by:
- enqueuein interface- ControlAwareMessageQueueSemantics
- Specified by:
- enqueuein interface- MessageQueue
 
- 
hasMessagespublic boolean hasMessages()Description copied from interface:MessageQueueIndicates whether this queue is non-empty.- Specified by:
- hasMessagesin interface- ControlAwareMessageQueueSemantics
- Specified by:
- hasMessagesin interface- MessageQueue
- Specified by:
- hasMessagesin interface- QueueBasedMessageQueue
 
- 
numberOfMessagespublic 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 interface- ControlAwareMessageQueueSemantics
- Specified by:
- numberOfMessagesin interface- MessageQueue
- Specified by:
- numberOfMessagesin interface- QueueBasedMessageQueue
 
- 
pushTimeOutpublic scala.concurrent.duration.FiniteDuration pushTimeOut()- Specified by:
- pushTimeOutin interface- BoundedMessageQueueSemantics
 
- 
queue- Specified by:
- queuein interface- ControlAwareMessageQueueSemantics
- Specified by:
- queuein interface- QueueBasedMessageQueue
 
 
-