Class DequeWrapperMessageQueue
Message queue for supporting IDequeBasedMessageQueueSemantics within Mailbox instances.
Uses a Stack<T> internally - each individual EnqueueFirst(Envelope)
Inherited Members
Namespace: Akka.Dispatch.MessageQueues
Assembly: Akka.dll
Syntax
public class DequeWrapperMessageQueue : IMessageQueue, IDequeBasedMessageQueueSemantics, ISemantics
Constructors
| Edit this page View SourceDequeWrapperMessageQueue(IMessageQueue)
Takes another IMessageQueue as an argument - wraps messageQueue
in order to provide it with prepend (EnqueueFirst(Envelope)) semantics.
Declaration
public DequeWrapperMessageQueue(IMessageQueue messageQueue)
Parameters
Type | Name | Description |
---|---|---|
IMessageQueue | messageQueue | The underlying message queue wrapped by this one. |
Fields
| Edit this page View SourceMessageQueue
The underlying IMessageQueue.
Declaration
protected readonly IMessageQueue MessageQueue
Field Value
Type | Description |
---|---|
IMessageQueue |
Properties
| Edit this page View SourceCount
Returns the number of messages in both the internal message queue and the prepend buffer.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
HasMessages
Returns true if there are any messages inside the queue.
Declaration
public bool HasMessages { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceCleanUp(IActorRef, IMessageQueue)
Interface to be implemented by all mailbox message queues
Declaration
public void CleanUp(IActorRef owner, IMessageQueue deadletters)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | owner | |
IMessageQueue | deadletters |
Enqueue(IActorRef, Envelope)
Interface to be implemented by all mailbox message queues
Declaration
public void Enqueue(IActorRef receiver, Envelope envelope)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | receiver | |
Envelope | envelope |
EnqueueFirst(Envelope)
Add a message to the front of the queue via the prepend buffer.
Declaration
public void EnqueueFirst(Envelope envelope)
Parameters
Type | Name | Description |
---|---|---|
Envelope | envelope | The message we wish to append to the front of the queue. |
TryDequeue(out Envelope)
Attempt to dequeue a message from the front of the prepend buffer.
If the prepend buffer is empty, dequeue a message from the normal IMessageQueue wrapped but this wrapper.
Declaration
public bool TryDequeue(out Envelope envelope)
Parameters
Type | Name | Description |
---|---|---|
Envelope | envelope | The message to return, if any |
Returns
Type | Description |
---|---|
bool |
|