Interface IMessageQueue
Interface to be implemented by all mailbox message queues
Namespace: Akka.Dispatch.MessageQueues
Assembly: Akka.dll
Syntax
public interface IMessageQueue
Properties
| Improve this Doc View SourceCount
Returns the count of messages currently in the message queue
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
HasMessages
Tests if the message queue contains any messages
Declaration
bool HasMessages { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceCleanUp(IActorRef, IMessageQueue)
Called when the Mailbox this queue belongs to is disposed of. Normally it is expected to transfer all remaining messages into the deadletter queue which is passed in. The owner of this IMessageQueue is passed in if available (e.g. for creating DeadLetters), "/deadletters" otherwise.
Declaration
void CleanUp(IActorRef owner, IMessageQueue deadletters)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | owner | The owner of this message queue if available, "/deadletters" otherwise. |
IMessageQueue | deadletters | The dead letters message queue. |
Enqueue(IActorRef, Envelope)
Enqueues an mailbox envelope onto the message queue
Declaration
void Enqueue(IActorRef receiver, Envelope envelope)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | receiver | The receiver of the messages. This field is only used in a couple of places, but it should not be removed. |
Envelope | envelope | The envelope to enqueue |
TryDequeue(out Envelope)
Tries to pull an envelope of the message queue
Declaration
bool TryDequeue(out Envelope envelope)
Parameters
Type | Name | Description |
---|---|---|
Envelope | envelope | The envelope that was dequeued |
Returns
Type | Description |
---|---|
Boolean |
|