Search Results for

    Show / Hide Table of Contents

    Class ListPriorityQueue

    Priority queue implemented using a simple list with binary search for inserts. This specific implementation is cheap in terms of memory but weak in terms of performance. See http://visualstudiomagazine.com/articles/2012/11/01/priority-queues-with-c.aspx for original implementation This specific version is adapted for Envelopes only and calculates a priority of envelope.Message

    Inheritance
    object
    ListPriorityQueue
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Akka.Util
    Assembly: Akka.dll
    Syntax
    public sealed class ListPriorityQueue

    Constructors

    | Edit this page View Source

    ListPriorityQueue(int, Func<object, int>)

    Creates a new priority queue.

    Declaration
    public ListPriorityQueue(int initialCapacity, Func<object, int> priorityCalculator)
    Parameters
    Type Name Description
    int initialCapacity

    The initial capacity of the queue.

    Func<object, int> priorityCalculator

    The calculator function for assigning message priorities.

    Methods

    | Edit this page View Source

    Count()

    Counts the number of items in the priority queue.

    Declaration
    public int Count()
    Returns
    Type Description
    int

    The total number of items in the queue.

    | Edit this page View Source

    Dequeue()

    Dequeues the highest priority message at the front of the priority queue.

    Declaration
    public Envelope Dequeue()
    Returns
    Type Description
    Envelope

    The highest priority message Envelope.

    | Edit this page View Source

    Enqueue(Envelope)

    Enqueues a message into the priority queue.

    Declaration
    public void Enqueue(Envelope item)
    Parameters
    Type Name Description
    Envelope item

    The item to enqueue.

    | Edit this page View Source

    IsConsistent()

    TBD

    Declaration
    public bool IsConsistent()
    Returns
    Type Description
    bool

    TBD

    | Edit this page View Source

    Peek()

    Peek at the message at the front of the priority queue.

    Declaration
    public Envelope Peek()
    Returns
    Type Description
    Envelope

    The highest priority message Envelope.

    | Edit this page View Source

    ToString()

    Converts the queue to a string representation.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the queue.

    Overrides
    object.ToString()

    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