Class RAMFile
Represents a file in RAM as a list of byte[] buffers.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Store
Assembly: Lucene.Net.dll
Syntax
public class RAMFile
Constructors
RAMFile()
File used as buffer, in no RAMDirectory
Declaration
public RAMFile()
RAMFile(RAMDirectory)
Represents a file in RAM as a list of byte[] buffers.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public RAMFile(RAMDirectory directory)
Parameters
Type | Name | Description |
---|---|---|
RAMDirectory | directory |
Fields
m_buffers
Represents a file in RAM as a list of byte[] buffers.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected IList<byte[]> m_buffers
Field Value
Type | Description |
---|---|
IList<byte[]> |
m_sizeInBytes
Represents a file in RAM as a list of byte[] buffers.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected long m_sizeInBytes
Field Value
Type | Description |
---|---|
long |
Properties
Length
For non-stream access from thread that might be concurrent with writing
Declaration
public virtual long Length { get; set; }
Property Value
Type | Description |
---|---|
long |
NumBuffers
Represents a file in RAM as a list of byte[] buffers.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected int NumBuffers { get; }
Property Value
Type | Description |
---|---|
int |
Methods
AddBuffer(int)
Represents a file in RAM as a list of byte[] buffers.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected byte[] AddBuffer(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size |
Returns
Type | Description |
---|---|
byte[] |
GetBuffer(int)
Represents a file in RAM as a list of byte[] buffers.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected byte[] GetBuffer(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index |
Returns
Type | Description |
---|---|
byte[] |
GetSizeInBytes()
Represents a file in RAM as a list of byte[] buffers.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public virtual long GetSizeInBytes()
Returns
Type | Description |
---|---|
long |
NewBuffer(int)
Expert: allocate a new buffer. Subclasses can allocate differently.
Declaration
protected virtual byte[] NewBuffer(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | size of allocated buffer. |
Returns
Type | Description |
---|---|
byte[] | allocated buffer. |