Class BoundedMailbox
The default bounded mailbox implementation
Inherited Members
Namespace: Akka.Dispatch
Assembly: Akka.dll
Syntax
public sealed class BoundedMailbox : MailboxType, IProducesMessageQueue<BoundedMessageQueue>, IProducesPushTimeoutSemanticsMailbox
Constructors
| Edit this page View SourceBoundedMailbox(Settings, Config)
A factory to create IMessageQueues for an optionally provided IActorContext.
Declaration
public BoundedMailbox(Settings settings, Config config)
Parameters
Type | Name | Description |
---|---|---|
Settings | settings | |
Config | config |
Remarks
Possibly important notice.
When implementing a custom MailboxType, be aware that there is special semantics attached to ActorOf(Props, string) in that sending the returned IActorRef may, for a short period of time, enqueue the messages first in a dummy queue. Top-level actors are created in two steps, and only after the guardian actor ahs performed that second step will all previously sent messages be transferred from the dummy queue to the real mailbox.
Implemented as an abstract class in order to enforce constructor requirements.
Exceptions
Type | Condition |
---|---|
ArgumentException | This exception is thrown if the 'mailbox-capacity' in |
Properties
| Edit this page View SourceCapacity
The capacity of this mailbox.
Declaration
public int Capacity { get; }
Property Value
Type | Description |
---|---|
int |
PushTimeout
The push timeout value. Will throw a timeout error after this period of time
Declaration
public TimeSpan PushTimeout { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
| Edit this page View SourceCreate(IActorRef, ActorSystem)
A factory to create IMessageQueues for an optionally provided IActorContext.
Declaration
public override IMessageQueue Create(IActorRef owner, ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | owner | |
ActorSystem | system |
Returns
Type | Description |
---|---|
IMessageQueue |
Overrides
Remarks
Possibly important notice.
When implementing a custom MailboxType, be aware that there is special semantics attached to ActorOf(Props, string) in that sending the returned IActorRef may, for a short period of time, enqueue the messages first in a dummy queue. Top-level actors are created in two steps, and only after the guardian actor ahs performed that second step will all previously sent messages be transferred from the dummy queue to the real mailbox.
Implemented as an abstract class in order to enforce constructor requirements.