17.264. Class TaskTableExt

Namespace: ArmoniK.Core.Common.gRPC.Convertors
Assembly: ArmoniK.Core.Common.dll

public static class TaskTableExt

17.264.1. Inheritance

objectTaskTableExt

17.264.2. Inherited Members

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

17.264.3. Methods

17.264.3.1. CancelTasks(ITaskTable, TaskFilter, CancellationToken)

Cancel the tasks matching the given filter

public static Task<int> CancelTasks(this ITaskTable taskTable, TaskFilter filter, CancellationToken cancellationToken = default)

17.264.3.1.1. Parameters

taskTable ITaskTable

Interface to manage tasks lifecycle

filter TaskFilter

Task Filter describing the tasks that should be cancelled

cancellationToken CancellationToken

Token used to cancel the execution of the method

17.264.3.1.2. Returns

Task<int>

The number of cancelled tasks

17.264.3.2. CountTasksAsync(ITaskTable, TaskFilter, CancellationToken)

Count tasks matching a given filter

public static Task<IEnumerable<TaskStatusCount>> CountTasksAsync(this ITaskTable taskTable, TaskFilter filter, CancellationToken cancellationToken = default)

17.264.3.2.1. Parameters

taskTable ITaskTable

Interface to manage tasks lifecycle

filter TaskFilter

Task Filter describing the tasks to be counted

cancellationToken CancellationToken

Token used to cancel the execution of the method

17.264.3.2.2. Returns

Task<IEnumerable<TaskStatusCount>>

The number of tasks that matched the filter

17.264.3.3. ListTasksAsync(ITaskTable, TaskFilter, CancellationToken)

List all tasks matching a given filter

public static IAsyncEnumerable<string> ListTasksAsync(this ITaskTable taskTable, TaskFilter filter, CancellationToken cancellationToken = default)

17.264.3.3.1. Parameters

taskTable ITaskTable

Interface to manage tasks lifecycle

filter TaskFilter

Task Filter describing the tasks to be counted

cancellationToken CancellationToken

Token used to cancel the execution of the method

17.264.3.3.2. Returns

IAsyncEnumerable<string>

List of tasks that matched the filter

17.264.3.4. UpdateAllTaskStatusAsync(ITaskTable, TaskFilter, TaskStatus, CancellationToken)

Update the statuses of all tasks matching a given filter

public static Task<long> UpdateAllTaskStatusAsync(this ITaskTable taskTable, TaskFilter filter, TaskStatus status, CancellationToken cancellationToken = default)

17.264.3.4.1. Parameters

taskTable ITaskTable

Interface to manage tasks lifecycle

filter TaskFilter

Task Filter describing the tasks whose status should be updated

status TaskStatus

The new task status

cancellationToken CancellationToken

Token used to cancel the execution of the method

17.264.3.4.2. Returns

Task<long>

The number of updated tasks