Show / Hide Table of Contents

Class SimpleChunkCache

A simple chunk cache.

Inheritance
System.Object
SimpleChunkCache
Implements
IChunkCache
Namespace: HDF5.NET
Assembly: HDF5.NET.dll
Syntax
public class SimpleChunkCache : IChunkCache

Constructors

| Improve this Doc View Source

SimpleChunkCache(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 Source

ByteCount

Gets the maximum size of the chunk cache in bytes.

Declaration
public ulong ByteCount { get; set; }
Property Value
Type Description
System.UInt64
| Improve this Doc View Source

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
| Improve this Doc View Source

ConsumedBytes

Gets the number of consumed bytes of the chunk cache.

Declaration
public ulong ConsumedBytes { get; }
Property Value
Type Description
System.UInt64
| Improve this Doc View Source

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 Source

GetChunkAsync(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.

Implements

IChunkCache
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2023 Vincent Wilms