21.266. Class TaskTableExt
Namespace: ArmoniK.Core.Common.gRPC.Convertors
Assembly: ArmoniK.Core.Common.dll
public static class TaskTableExt
21.266.1. Inheritance
21.266.2. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
21.266.3. Methods
21.266.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)
21.266.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
21.266.3.1.2. Returns
The number of cancelled tasks
21.266.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)
21.266.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
21.266.3.2.2. Returns
Task<IEnumerable<TaskStatusCount>>
The number of tasks that matched the filter
21.266.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)
21.266.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
21.266.3.3.2. Returns
List of tasks that matched the filter
21.266.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)
21.266.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
21.266.3.4.2. Returns
The number of updated tasks