21.173. Class DataPrefetcher
Namespace: ArmoniK.Core.Common.Pollster
Assembly: ArmoniK.Core.Common.dll
Prefetch data needed to execute a task
public class DataPrefetcher : IInitializable, IHealthCheckProvider
21.173.1. Inheritance
21.173.2. Implements
IInitializable, IHealthCheckProvider
21.173.3. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
21.173.4. Constructors
21.173.4.1. DataPrefetcher(IObjectStorage, IResultTable, ActivitySource?, ILogger<DataPrefetcher>)
Create data prefetcher for tasks
public DataPrefetcher(IObjectStorage objectStorage, IResultTable resultTable, ActivitySource? activitySource, ILogger<DataPrefetcher> logger)
21.173.4.1.1. Parameters
objectStorage IObjectStorage
Interface to manage data
resultTable IResultTable
Interface to manage results metadata
activitySource ActivitySource?
Activity source for tracing
logger ILogger<DataPrefetcher>
Logger used to print logs
21.173.5. Methods
21.173.5.1. Check(HealthCheckTag)
Checks the status of a class for the given health check type.
public Task<HealthCheckResult> Check(HealthCheckTag tag)
21.173.5.1.1. Parameters
tag HealthCheckTag
Health check for which the class has to answer.
21.173.5.1.2. Returns
The result of the check containing the status of the class for the health check type.
21.173.5.2. Init(CancellationToken)
Executes an initialization process for the class
public Task Init(CancellationToken cancellationToken)
21.173.5.2.1. Parameters
cancellationToken CancellationToken
Token used to cancel the execution of the method
21.173.5.2.2. Returns
Task representing the asynchronous execution of the method
21.173.5.3. PrefetchDataAsync(TaskData, string, CancellationToken)
Method used to prefetch data before executing a task
public Task PrefetchDataAsync(TaskData taskData, string folder, CancellationToken cancellationToken)
21.173.5.3.1. Parameters
taskData TaskData
Task metadata
folder string
Path in which pre-fetched data are stored
cancellationToken CancellationToken
Token used to cancel the execution of the method
21.173.5.3.2. Returns
Task representing the asynchronous execution of the method
21.173.5.3.3. Exceptions
ObjectDataNotFoundException
input data are not found