23.174. Class DataPrefetcher
Namespace: ArmoniK.Core.Common.Pollster
Assembly: ArmoniK.Core.Common.dll
Prefetch data needed to execute a task
public class DataPrefetcher : IInitializable, IHealthCheckProvider
23.174.1. Inheritance
23.174.2. Implements
IInitializable, IHealthCheckProvider
23.174.3. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
23.174.4. Constructors
23.174.4.1. DataPrefetcher(IObjectStorage, ActivitySource?, ILogger<DataPrefetcher>)
Create data prefetcher for tasks
public DataPrefetcher(IObjectStorage objectStorage, ActivitySource? activitySource, ILogger<DataPrefetcher> logger)
23.174.4.1.1. Parameters
objectStorage IObjectStorage
Interface to manage data
activitySource ActivitySource?
Activity source for tracing
logger ILogger<DataPrefetcher>
Logger used to print logs
23.174.5. Methods
23.174.5.1. Check(HealthCheckTag)
Checks the status of a class for the given health check type.
public Task<HealthCheckResult> Check(HealthCheckTag tag)
23.174.5.1.1. Parameters
tag HealthCheckTag
Health check for which the class has to answer.
23.174.5.1.2. Returns
The result of the check containing the status of the class for the health check type.
23.174.5.2. Init(CancellationToken)
Executes an initialization process for the class
public Task Init(CancellationToken cancellationToken)
23.174.5.2.1. Parameters
cancellationToken CancellationToken
Token used to cancel the execution of the method
23.174.5.2.2. Returns
Task representing the asynchronous execution of the method
23.174.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)
23.174.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
23.174.5.3.2. Returns
Task representing the asynchronous execution of the method
23.174.5.3.3. Exceptions
ObjectDataNotFoundException
input data are not found