Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class RollingBuffer<T>

    Acts like forever growing T[], but internally uses a circular buffer to reuse instances of .

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    object
    RollingBuffer<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class RollingBuffer<T> where T : IResettable
    Type Parameters
    Name Description
    T

    Constructors

    RollingBuffer(IRollingBufferItemFactory<T>)

    Acts like forever growing T[], but internally uses a circular buffer to reuse instances of .

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    protected RollingBuffer(IRollingBufferItemFactory<T> itemFactory)
    Parameters
    Type Name Description
    IRollingBufferItemFactory<T> itemFactory

    Properties

    MaxPos

    Returns the maximum position looked up, or -1 if no position has been looked up since Reset()/init.

    Declaration
    public virtual int MaxPos { get; }
    Property Value
    Type Description
    int

    Methods

    FreeBefore(int)

    Acts like forever growing T[], but internally uses a circular buffer to reuse instances of .

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public virtual void FreeBefore(int pos)
    Parameters
    Type Name Description
    int pos

    Get(int)

    Get T instance for this absolute position; This is allowed to be arbitrarily far "in the future" but cannot be before the last FreeBefore(int).

    Declaration
    public virtual T Get(int pos)
    Parameters
    Type Name Description
    int pos
    Returns
    Type Description
    T

    Reset()

    Acts like forever growing T[], but internally uses a circular buffer to reuse instances of .

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public virtual void Reset()
    Back to top Copyright © 2024 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.