Search Results for

    Show / Hide Table of Contents

    Class UnboundedStablePriorityMailbox

    Priority mailbox - an unbounded mailbox that allows for prioritization of its contents. Extend this class and implement the PriorityGenerator(object) method with your own prioritization. The value returned by the PriorityGenerator(object) method will be used to order the message in the mailbox. Lower values will be delivered first. Messages ordered by the same number will remain in delivery order.

    Inheritance
    object
    MailboxType
    UnboundedStablePriorityMailbox
    Implements
    IProducesMessageQueue<UnboundedStablePriorityMessageQueue>
    Inherited Members
    MailboxType.Settings
    MailboxType.Config
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Dispatch
    Assembly: Akka.dll
    Syntax
    public abstract class UnboundedStablePriorityMailbox : MailboxType, IProducesMessageQueue<UnboundedStablePriorityMessageQueue>

    Constructors

    | Edit this page View Source

    UnboundedStablePriorityMailbox(Settings, Config)

    A factory to create IMessageQueues for an optionally provided IActorContext.

    Declaration
    protected UnboundedStablePriorityMailbox(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.

    Fields

    | Edit this page View Source

    DefaultCapacity

    The default capacity of an unbounded priority mailbox.

    Declaration
    public const int DefaultCapacity = 11
    Field Value
    Type Description
    int

    Properties

    | Edit this page View Source

    InitialCapacity

    The initial capacity of the unbounded mailbox.

    Declaration
    public int InitialCapacity { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Create(IActorRef, ActorSystem)

    A factory to create IMessageQueues for an optionally provided IActorContext.

    Declaration
    public override sealed IMessageQueue Create(IActorRef owner, ActorSystem system)
    Parameters
    Type Name Description
    IActorRef owner
    ActorSystem system
    Returns
    Type Description
    IMessageQueue
    Overrides
    MailboxType.Create(IActorRef, ActorSystem)
    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.

    | Edit this page View Source

    PriorityGenerator(object)

    Function responsible for generating the priority value of a message based on its type and content.

    Declaration
    protected abstract int PriorityGenerator(object message)
    Parameters
    Type Name Description
    object message

    The message to inspect.

    Returns
    Type Description
    int

    An integer. The lower the value, the higher the priority.

    Implements

    IProducesMessageQueue<TQueue>

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET