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
System.Object
RollingBuffer<T>
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.Util
Assembly: Lucene.Net.dll
Syntax
public abstract class RollingBuffer<T>
where T : RollingBuffer.IResettable
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceRollingBuffer()
Declaration
protected RollingBuffer()
RollingBuffer(Func<T>)
Declaration
protected RollingBuffer(Func<T> factory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T> | factory |
Properties
| Improve this Doc View SourceMaxPos
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 |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceFreeBefore(Int32)
Declaration
public virtual void FreeBefore(int pos)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pos |
Get(Int32)
Get T
instance for this absolute position;
This is allowed to be arbitrarily far "in the
future" but cannot be before the last FreeBefore(Int32).
Declaration
public virtual T Get(int pos)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pos |
Returns
Type | Description |
---|---|
T |
NewInstance()
Declaration
protected abstract T NewInstance()
Returns
Type | Description |
---|---|
T |
Reset()
Declaration
public virtual void Reset()