26.179. Class DataPrefetcher

Namespace: ArmoniK.Core.Common.Pollster
Assembly: ArmoniK.Core.Common.dll

Prefetch data needed to execute a task

public class DataPrefetcher : IInitializable, IHealthCheckProvider

26.179.1. Inheritance

objectDataPrefetcher

26.179.2. Implements

IInitializable, IHealthCheckProvider

26.179.3. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

26.179.4. Constructors

26.179.4.1. DataPrefetcher(IObjectStorage, ActivitySource?, ILogger<DataPrefetcher>)

Create data prefetcher for tasks

public DataPrefetcher(IObjectStorage objectStorage, ActivitySource? activitySource, ILogger<DataPrefetcher> logger)

26.179.4.1.1. Parameters

objectStorage IObjectStorage

Interface to manage data

activitySource ActivitySource?

Activity source for tracing

logger ILogger<DataPrefetcher>

Logger used to print logs

26.179.5. Methods

26.179.5.1. Check(HealthCheckTag)

Checks the status of a class for the given health check type.

public Task<HealthCheckResult> Check(HealthCheckTag tag)

26.179.5.1.1. Parameters

tag HealthCheckTag

Health check for which the class has to answer.

26.179.5.1.2. Returns

Task<HealthCheckResult>

The result of the check containing the status of the class for the health check type.

26.179.5.2. Init(CancellationToken)

Executes an initialization process for the class

public Task Init(CancellationToken cancellationToken)

26.179.5.2.1. Parameters

cancellationToken CancellationToken

Token used to cancel the execution of the method

26.179.5.2.2. Returns

Task

Task representing the asynchronous execution of the method

26.179.5.3. PrefetchDataAsync(Dictionary<string, byte[]>, string, CancellationToken)

Method used to prefetch data before executing a task

public Task PrefetchDataAsync(Dictionary<string, byte[]> opaqueIds, string folder, CancellationToken cancellationToken)

26.179.5.3.1. Parameters

opaqueIds Dictionary<string, byte[]>

Dictionary containing

folder string

Path in which pre-fetched data are stored

cancellationToken CancellationToken

Token used to cancel the execution of the method

26.179.5.3.2. Returns

Task

Task representing the asynchronous execution of the method

26.179.5.3.3. Exceptions

ObjectDataNotFoundException

input data are not found