22.179. Class Pollster
Namespace: ArmoniK.Core.Common.Pollster
Assembly: ArmoniK.Core.Common.dll
Controls the polling and processing of tasks from the queue, manages task execution lifecycle, and provides health check capabilities.
public class Pollster : IInitializable, IHealthCheckProvider
22.179.1. Inheritance
22.179.2. Implements
IInitializable, IHealthCheckProvider
22.179.3. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
22.179.4. Constructors
22.179.4.1. Pollster(IPullQueueStorage, IPushQueueStorage, DataPrefetcher, ComputePlane, Pollster, Submitter, ExceptionManager, ActivitySource, ILogger<Pollster>, ILoggerFactory, IObjectStorage, IResultTable, ISubmitter, ISessionTable, ITaskTable, ITaskProcessingChecker, IWorkerStreamHandler, IAgentHandler, RunningTaskQueue, AgentIdentifier, MeterHolder, HealthCheckRecord)
Initializes a new instance of the
public Pollster(IPullQueueStorage pullQueueStorage, IPushQueueStorage pushQueueStorage, DataPrefetcher dataPrefetcher, ComputePlane options, Pollster pollsterOptions, Submitter submitterOptions, ExceptionManager exceptionManager, ActivitySource activitySource, ILogger<Pollster> logger, ILoggerFactory loggerFactory, IObjectStorage objectStorage, IResultTable resultTable, ISubmitter submitter, ISessionTable sessionTable, ITaskTable taskTable, ITaskProcessingChecker taskProcessingChecker, IWorkerStreamHandler workerStreamHandler, IAgentHandler agentHandler, RunningTaskQueue runningTaskQueue, AgentIdentifier identifier, MeterHolder meterHolder, HealthCheckRecord healthCheckRecord)
22.179.4.1.1. Parameters
pullQueueStorage IPullQueueStorage
The storage service for pulling tasks from the queue.
pushQueueStorage IPushQueueStorage
The storage service for pushing tasks into the queue.
dataPrefetcher DataPrefetcher
The service to prefetch data needed for task execution.
options ComputePlane
Configuration options for the compute plane.
pollsterOptions Pollster
Specific options for the pollster behavior.
submitterOptions Submitter
Specific options for the submitter behavior.
exceptionManager ExceptionManager
Manager to handle and record exceptions.
activitySource ActivitySource
Source for activity tracking and tracing.
Logger for the pollster.
loggerFactory ILoggerFactory
Factory to create loggers for child components.
objectStorage IObjectStorage
Storage for task-related objects.
resultTable IResultTable
Table to store task results.
submitter ISubmitter
Service to submit new tasks.
sessionTable ISessionTable
Table to manage sessions.
taskTable ITaskTable
Table to store and retrieve task information.
taskProcessingChecker ITaskProcessingChecker
Service to check if tasks can be processed.
workerStreamHandler IWorkerStreamHandler
Handler for worker streams.
agentHandler IAgentHandler
Handler for agents.
runningTaskQueue RunningTaskQueue
Queue for running tasks.
identifier AgentIdentifier
Identifier for the agent running the pollster.
meterHolder MeterHolder
Holder for metrics collection.
healthCheckRecord HealthCheckRecord
Record for the health check of the application.
22.179.4.1.2. Exceptions
Thrown when message batch size is less than 1.
22.179.5. Properties
22.179.5.1. TaskProcessing
Gets the collection of task IDs that are currently being processed.
public ICollection<string> TaskProcessing { get; }
22.179.5.1.1. Property Value
22.179.6. Methods
22.179.6.1. Check(HealthCheckTag)
Performs health checks on the pollster and its dependencies.
public Task<HealthCheckResult> Check(HealthCheckTag tag)
22.179.6.1.1. Parameters
tag HealthCheckTag
The type of health check to perform.
22.179.6.1.2. Returns
The health check result.
22.179.6.2. Init(CancellationToken)
Initializes the pollster and its dependencies.
public Task Init(CancellationToken cancellationToken)
22.179.6.2.1. Parameters
cancellationToken CancellationToken
Token to cancel the initialization.
22.179.6.2.2. Returns
A task representing the asynchronous initialization operation.
22.179.6.3. MainLoop()
Main processing loop for the pollster that fetches and processes tasks.
public Task MainLoop()
22.179.6.3.1. Returns
A task representing the asynchronous operation.
22.179.6.4. StopCancelledTask()
Stops any cancelled tasks that are currently being processed.
public Task StopCancelledTask()
22.179.6.4.1. Returns
A task representing the asynchronous operation.