Class SimpleChunkCache
A simple chunk cache.
Inheritance
System.Object
SimpleChunkCache
Implements
Namespace: HDF5.NET
Assembly: HDF5.NET.dll
Syntax
public class SimpleChunkCache : IChunkCache
Constructors
| Improve this Doc View SourceSimpleChunkCache(Int32, UInt64)
Initializes a new instance of the SimpleChunkCache instance.
Declaration
public SimpleChunkCache(int chunkSlotCount = 521, ulong byteCount = 1048576UL)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | chunkSlotCount | The number of chunks that can be hold in the cache at the same time. |
System.UInt64 | byteCount | The maximum size of the chunk cache in bytes. |
Properties
| Improve this Doc View SourceByteCount
Gets the maximum size of the chunk cache in bytes.
Declaration
public ulong ByteCount { get; set; }
Property Value
Type | Description |
---|---|
System.UInt64 |
ChunkSlotCount
Gets the number of chunks that can be hold in the cache at the same time.
Declaration
public int ChunkSlotCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ConsumedBytes
Gets the number of consumed bytes of the chunk cache.
Declaration
public ulong ConsumedBytes { get; }
Property Value
Type | Description |
---|---|
System.UInt64 |
ConsumedSlots
Gets the number of chunk slots that have already been consumed.
Declaration
public int ConsumedSlots { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceGetChunkAsync(UInt64[], Func<Task<Memory<Byte>>>)
Tries to get the chunk at the given position.
Declaration
public async Task<Memory<byte>> GetChunkAsync(ulong[] indices, Func<Task<Memory<byte>>> chunkLoader)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64[] | indices | The chunk position. |
System.Func<System.Threading.Tasks.Task<System.Memory<System.Byte>>> | chunkLoader | The chunk load is used whenever the chunk is not already cached. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Memory<System.Byte>> | The chunk. |