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.
Inherited Members
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()