Class RAMFile
Represents a file in RAM as a list of byte[] buffers.
This is a Lucene.NET INTERNAL API, use at your own risk
Inheritance
System.Object
RAMFile
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.Store
Assembly: Lucene.Net.dll
Syntax
public class RAMFile
Constructors
| Improve this Doc View SourceRAMFile()
File used as buffer, in no RAMDirectory
Declaration
public RAMFile()
RAMFile(RAMDirectory)
Declaration
public RAMFile(RAMDirectory directory)
Parameters
Type | Name | Description |
---|---|---|
RAMDirectory | directory |
Fields
| Improve this Doc View Sourcem_buffers
Declaration
protected List<byte[]> m_buffers
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Byte[]> |
m_sizeInBytes
Declaration
protected long m_sizeInBytes
Field Value
Type | Description |
---|---|
System.Int64 |
Properties
| Improve this Doc View SourceLength
For non-stream access from thread that might be concurrent with writing
Declaration
public virtual long Length { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
NumBuffers
Declaration
protected int NumBuffers { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceAddBuffer(Int32)
Declaration
protected byte[] AddBuffer(int size)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | size |
Returns
Type | Description |
---|---|
System.Byte[] |
GetBuffer(Int32)
Declaration
protected byte[] GetBuffer(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Returns
Type | Description |
---|---|
System.Byte[] |
GetSizeInBytes()
Declaration
public virtual long GetSizeInBytes()
Returns
Type | Description |
---|---|
System.Int64 |
NewBuffer(Int32)
Expert: allocate a new buffer. Subclasses can allocate differently.
Declaration
protected virtual byte[] NewBuffer(int size)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | size | size of allocated buffer. |
Returns
Type | Description |
---|---|
System.Byte[] | allocated buffer. |