Class RollingBuffer<T>
Acts like forever growing T[], but internally uses a
circular buffer to reuse instances of
This is a Lucene.NET INTERNAL API, use at your own risk
Inheritance
System.Object
RollingBuffer<T>
Namespace: Lucene.Net.Util
Assembly: Lucene.Net.dll
Syntax
public abstract class RollingBuffer<T> : object 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 |
---|---|---|
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. |
Methods
| Improve this Doc View SourceFreeBefore(Int32)
Declaration
public virtual void FreeBefore(int pos)
Parameters
Type | Name | Description |
---|---|---|
System. |
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 Free
Declaration
public virtual T Get(int pos)
Parameters
Type | Name | Description |
---|---|---|
System. |
pos |
Returns
Type | Description |
---|---|
T |
NewInstance()
Declaration
protected abstract T NewInstance()
Returns
Type | Description |
---|---|
T |
Reset()
Declaration
public virtual void Reset()