Table of Contents

Interface IWritingChunkCache

Namespace
PureHDF.VOL.Native
Assembly
PureHDF.dll

Caches chunks during write operations.

public interface IWritingChunkCache

Methods

Flush(Action<ulong, Memory<byte>>)

Flushes the chunk.

void Flush(Action<ulong, Memory<byte>> chunkWriter)

Parameters

chunkWriter Action<ulong, Memory<byte>>

The chunk writer used for chunks being flushed from the cache.

GetChunk(ulong, Func<Memory<byte>>, Action<ulong, Memory<byte>>)

Tries to get the chunk at the given index.

Memory<byte> GetChunk(ulong chunkIndex, Func<Memory<byte>> chunkAllocator, Action<ulong, Memory<byte>> chunkWriter)

Parameters

chunkIndex ulong

The linear chunk index.

chunkAllocator Func<Memory<byte>>

The chunk allocator is used whenever the chunk is not already cached.

chunkWriter Action<ulong, Memory<byte>>

The chunk writer is used whenever the chunk is flushed from the cache.

Returns

Memory<byte>