Class FileRandomAccessDevice
Inheritance
FileRandomAccessDevice
Assembly: ZoneTree.dll
Syntax
public sealed class FileRandomAccessDevice : IRandomAccessDevice, IDisposable
Constructors
|
Improve this Doc
View Source
FileRandomAccessDevice(IFileStreamProvider, long, string, IRandomAccessDeviceManager, string, bool, int)
Declaration
public FileRandomAccessDevice(IFileStreamProvider fileStreamProvider, long segmentId, string category, IRandomAccessDeviceManager randomDeviceManager, string filePath, bool writable, int fileIOBufferSize = 4096)
Parameters
Properties
|
Improve this Doc
View Source
FilePath
Declaration
public string FilePath { get; }
Property Value
|
Improve this Doc
View Source
Length
Declaration
public long Length { get; }
Property Value
|
Improve this Doc
View Source
ReadBufferCount
Returns read buffer count.
Declaration
public int ReadBufferCount { get; }
Property Value
|
Improve this Doc
View Source
SegmentId
Declaration
public long SegmentId { get; }
Property Value
|
Improve this Doc
View Source
Writable
Declaration
public bool Writable { get; }
Property Value
Methods
|
Improve this Doc
View Source
AppendBytesReturnPosition(Memory<byte>)
Appends bytes and returns the position of the appended bytes.
Declaration
public long AppendBytesReturnPosition(Memory<byte> bytes)
Parameters
Returns
Type |
Description |
long |
Position of the bytes.
|
|
Improve this Doc
View Source
ClearContent()
Declaration
public void ClearContent()
|
Improve this Doc
View Source
Close()
Declaration
|
Improve this Doc
View Source
Delete()
Declaration
|
Improve this Doc
View Source
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
|
Improve this Doc
View Source
GetBytes(long, int, SingleBlockPin)
Declaration
public Memory<byte> GetBytes(long offset, int length, SingleBlockPin pin)
Parameters
Returns
|
Improve this Doc
View Source
ReleaseInactiveCachedBuffers(long)
Releases inactive cached read buffers.
The buffers that have not been accessed since given ticks are released.
Declaration
public int ReleaseInactiveCachedBuffers(long ticks)
Parameters
Type |
Name |
Description |
long |
ticks |
|
Returns
Type |
Description |
int |
Total released read buffer count.
|
|
Improve this Doc
View Source
SealDevice()
Seals the device.
Sealed devices can not accept new writes
and becomes immutable.
Declaration
Implements