Package akka.dispatch
Class BoundedControlAwareMailbox.MessageQueue
- java.lang.Object
-
- akka.dispatch.BoundedControlAwareMailbox.MessageQueue
-
- All Implemented Interfaces:
BoundedControlAwareMessageQueueSemantics
,BoundedMessageQueueSemantics
,ControlAwareMessageQueueSemantics
,MessageQueue
,MultipleConsumerSemantics
,QueueBasedMessageQueue
,java.io.Serializable
- Enclosing class:
- BoundedControlAwareMailbox
public static class BoundedControlAwareMailbox.MessageQueue extends java.lang.Object implements BoundedControlAwareMessageQueueSemantics, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MessageQueue(int capacity, scala.concurrent.duration.FiniteDuration pushTimeOut)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
capacity()
java.util.concurrent.ConcurrentLinkedQueue<Envelope>
controlQueue()
Envelope
dequeue()
Try to dequeue the next message from this queue, return null failing that.void
enqueue(ActorRef receiver, Envelope handle)
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.scala.concurrent.duration.FiniteDuration
pushTimeOut()
java.util.concurrent.ConcurrentLinkedQueue<Envelope>
queue()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.dispatch.QueueBasedMessageQueue
cleanUp
-
-
-
-
Method Detail
-
capacity
public int capacity()
-
controlQueue
public java.util.concurrent.ConcurrentLinkedQueue<Envelope> controlQueue()
- Specified by:
controlQueue
in interfaceControlAwareMessageQueueSemantics
-
dequeue
public final Envelope dequeue()
Description copied from interface:MessageQueue
Try to dequeue the next message from this queue, return null failing that.- Specified by:
dequeue
in interfaceControlAwareMessageQueueSemantics
- Specified by:
dequeue
in interfaceMessageQueue
- Returns:
- (undocumented)
-
enqueue
public void enqueue(ActorRef receiver, Envelope handle)
- Specified by:
enqueue
in interfaceControlAwareMessageQueueSemantics
- Specified by:
enqueue
in interfaceMessageQueue
-
hasMessages
public boolean hasMessages()
Description copied from interface:MessageQueue
Indicates whether this queue is non-empty.- Specified by:
hasMessages
in interfaceControlAwareMessageQueueSemantics
- Specified by:
hasMessages
in interfaceMessageQueue
- Specified by:
hasMessages
in interfaceQueueBasedMessageQueue
- Returns:
- (undocumented)
-
numberOfMessages
public 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 interfaceControlAwareMessageQueueSemantics
- Specified by:
numberOfMessages
in interfaceMessageQueue
- Specified by:
numberOfMessages
in interfaceQueueBasedMessageQueue
- Returns:
- (undocumented)
-
pushTimeOut
public scala.concurrent.duration.FiniteDuration pushTimeOut()
- Specified by:
pushTimeOut
in interfaceBoundedMessageQueueSemantics
-
queue
public java.util.concurrent.ConcurrentLinkedQueue<Envelope> queue()
- Specified by:
queue
in interfaceControlAwareMessageQueueSemantics
- Specified by:
queue
in interfaceQueueBasedMessageQueue
-
-