Search Results for

    Show / Hide Table of Contents

    Class TokenBucket

    Applies token-bucket throttling to introduce latency to a connection

    Inheritance
    object
    ThrottleMode
    TokenBucket
    Implements
    INoSerializationVerificationNeeded
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Remote.Transport
    Assembly: Akka.Remote.dll
    Syntax
    public sealed class TokenBucket : ThrottleMode, INoSerializationVerificationNeeded

    Constructors

    | Edit this page View Source

    TokenBucket(int, double, long, int)

    TBD

    Declaration
    public TokenBucket(int capacity, double tokensPerSecond, long nanoTimeOfLastSend, int availableTokens)
    Parameters
    Type Name Description
    int capacity

    TBD

    double tokensPerSecond

    TBD

    long nanoTimeOfLastSend

    TBD

    int availableTokens

    TBD

    Methods

    | Edit this page View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page View Source

    TimeToAvailable(long, int)

    TBD

    Declaration
    public override TimeSpan TimeToAvailable(long currentNanoTime, int tokens)
    Parameters
    Type Name Description
    long currentNanoTime

    TBD

    int tokens

    TBD

    Returns
    Type Description
    TimeSpan

    TBD

    Overrides
    ThrottleMode.TimeToAvailable(long, int)
    | Edit this page View Source

    TryConsumeTokens(long, int)

    TBD

    Declaration
    public override (ThrottleMode, bool) TryConsumeTokens(long nanoTimeOfSend, int tokens)
    Parameters
    Type Name Description
    long nanoTimeOfSend

    TBD

    int tokens

    TBD

    Returns
    Type Description
    (ThrottleMode, bool)

    TBD

    Overrides
    ThrottleMode.TryConsumeTokens(long, int)

    Operators

    | Edit this page View Source

    operator ==(TokenBucket, TokenBucket)

    Compares two specified TokenBucket for equality.

    Declaration
    public static bool operator ==(TokenBucket left, TokenBucket right)
    Parameters
    Type Name Description
    TokenBucket left

    The first TokenBucket used for comparison

    TokenBucket right

    The second TokenBucket used for comparison

    Returns
    Type Description
    bool

    true if both TokenBuckets are equal; otherwise false

    | Edit this page View Source

    operator !=(TokenBucket, TokenBucket)

    Compares two specified TokenBucket for inequality.

    Declaration
    public static bool operator !=(TokenBucket left, TokenBucket right)
    Parameters
    Type Name Description
    TokenBucket left

    The first TokenBucket used for comparison

    TokenBucket right

    The second TokenBucket used for comparison

    Returns
    Type Description
    bool

    true if both TokenBuckets are not equal; otherwise false

    Implements

    INoSerializationVerificationNeeded

    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