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 intcapacity()java.util.concurrent.ConcurrentLinkedQueue<Envelope>controlQueue()Envelopedequeue()Try to dequeue the next message from this queue, return null failing that.voidenqueue(ActorRef receiver, Envelope handle)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.scala.concurrent.duration.FiniteDurationpushTimeOut()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:
controlQueuein interfaceControlAwareMessageQueueSemantics
-
dequeue
public final Envelope dequeue()
Description copied from interface:MessageQueueTry to dequeue the next message from this queue, return null failing that.- Specified by:
dequeuein interfaceControlAwareMessageQueueSemantics- Specified by:
dequeuein interfaceMessageQueue- Returns:
- (undocumented)
-
enqueue
public void enqueue(ActorRef receiver, Envelope handle)
- Specified by:
enqueuein interfaceControlAwareMessageQueueSemantics- Specified by:
enqueuein interfaceMessageQueue
-
hasMessages
public boolean hasMessages()
Description copied from interface:MessageQueueIndicates whether this queue is non-empty.- Specified by:
hasMessagesin interfaceControlAwareMessageQueueSemantics- Specified by:
hasMessagesin interfaceMessageQueue- Specified by:
hasMessagesin interfaceQueueBasedMessageQueue- Returns:
- (undocumented)
-
numberOfMessages
public 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 interfaceControlAwareMessageQueueSemantics- Specified by:
numberOfMessagesin interfaceMessageQueue- Specified by:
numberOfMessagesin interfaceQueueBasedMessageQueue- Returns:
- (undocumented)
-
pushTimeOut
public scala.concurrent.duration.FiniteDuration pushTimeOut()
- Specified by:
pushTimeOutin interfaceBoundedMessageQueueSemantics
-
queue
public java.util.concurrent.ConcurrentLinkedQueue<Envelope> queue()
- Specified by:
queuein interfaceControlAwareMessageQueueSemantics- Specified by:
queuein interfaceQueueBasedMessageQueue
-
-