Search Results for

    Show / Hide Table of Contents

    Class Resizer

    Pool routers with dynamically resizable number of routees are implemented by providing a Resizer implementation in the Pool configuration

    Inheritance
    object
    Resizer
    DefaultResizer
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Routing
    Assembly: Akka.dll
    Syntax
    public abstract class Resizer

    Methods

    | Edit this page View Source

    FromConfig(Config)

    TBD

    Declaration
    public static Resizer FromConfig(Config parentConfig)
    Parameters
    Type Name Description
    Config parentConfig

    TBD

    Returns
    Type Description
    Resizer

    TBD

    | Edit this page View Source

    IsTimeForResize(long)

    Is it time for resizing. Typically implemented with modulo of nth message, but could be based on elapsed time or something else. The messageCounter starts with 0 for the initial resize and continues with 1 for the first message. Make sure to perform initial resize before first message (messageCounter == 0), because there is no guarantee that resize will be done when concurrent messages are in play.

    CAUTION: this method is invoked from the thread which tries to send a message to the pool, i.e. the ActorRef.!() method, hence it may be called concurrently.

    Declaration
    public abstract bool IsTimeForResize(long messageCounter)
    Parameters
    Type Name Description
    long messageCounter

    TBD

    Returns
    Type Description
    bool

    TBD

    | Edit this page View Source

    Resize(IEnumerable<Routee>)

    Decide if the capacity of the router need to be changed. Will be invoked when isTimeForResize returns true and no other resize is in progress.

    Return the number of routees to add or remove. Negative value will remove that number of routees. Positive value will add that number of routess. 0 will not change the routees.

    This method is invoked only in the context of the Router actor.

    Declaration
    public abstract int Resize(IEnumerable<Routee> currentRoutees)
    Parameters
    Type Name Description
    IEnumerable<Routee> currentRoutees

    TBD

    Returns
    Type Description
    int

    TBD

    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