Table of Contents

Class SequentialBulkReader<TData>

Namespace
Hi.Common.ParallelBulkUtils
Assembly
HiGeom.dll

Sequential bulk reader that provides efficient data access with caching capabilities. Unlike ParallelBulkReader<TData>, this reader processes data sequentially.

public class SequentialBulkReader<TData> where TData : class

Type Parameters

TData

The type of data to read.

Inheritance
SequentialBulkReader<TData>
Inherited Members
Extension Methods

Constructors

SequentialBulkReader(int, int, ReadBulkDelegate<TData>, Func<TData, int?>, Func<int>)

Initializes a new instance of the SequentialBulkReader<TData> class.

public SequentialBulkReader(int bulkListSize, int bulkSize, ReadBulkDelegate<TData> readBulkFunc, Func<TData, int?> getIndexFunc, Func<int> countFunc)

Parameters

bulkListSize int

The number of bulk lists to maintain in the cache.

bulkSize int

The size of each bulk.

readBulkFunc ReadBulkDelegate<TData>

The function used to read bulk data.

getIndexFunc Func<TData, int?>

The function used to extract an index from a data item.

countFunc Func<int>

The function that returns the total count of available data items.

Properties

CountFunc

Gets the function that returns the total count of available data items.

public Func<int> CountFunc { get; }

Property Value

Func<int>

GetIndexFunc

Gets the function used to extract an index from a data item.

public Func<TData, int?> GetIndexFunc { get; }

Property Value

Func<TData, int?>

Methods

ClearCache()

Clears all cached data.

public void ClearCache()

GetStep(int)

Gets a data item at the specified step index, with automatic caching.

public TData GetStep(int stepIndex)

Parameters

stepIndex int

The index of the step to retrieve.

Returns

TData

The data item at the specified index.