Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class RateLimiter

    Abstract base class to rate limit IO. Typically implementations are shared across multiple IndexInputs or IndexOutputs (for example those involved all merging). Those IndexInputs and IndexOutputs would call Pause(Int64) whenever they want to read bytes or write bytes.

    Inheritance
    System.Object
    RateLimiter
    RateLimiter.SimpleRateLimiter
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Store
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class RateLimiter

    Properties

    | Improve this Doc View Source

    MbPerSec

    The current mb per second rate limit.

    Declaration
    public abstract double MbPerSec { get; }
    Property Value
    Type Description
    System.Double

    Methods

    | Improve this Doc View Source

    Pause(Int64)

    Pauses, if necessary, to keep the instantaneous IO rate at or below the target.

    Note: the implementation is thread-safe

    Declaration
    public abstract long Pause(long bytes)
    Parameters
    Type Name Description
    System.Int64 bytes
    Returns
    Type Description
    System.Int64

    the pause time in nano seconds

    | Improve this Doc View Source

    SetMbPerSec(Double)

    Sets an updated mb per second rate limit.

    Declaration
    public abstract void SetMbPerSec(double mbPerSec)
    Parameters
    Type Name Description
    System.Double mbPerSec
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.