21.222. Class ResultLifeCycleHelper
Namespace: ArmoniK.Core.Common.Storage
Assembly: ArmoniK.Core.Common.dll
Helper to manage Results
public static class ResultLifeCycleHelper
21.222.1. Inheritance
21.222.2. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
21.222.3. Methods
21.222.3.1. AbortTasksAndResults(ITaskTable, IResultTable, ICollection<string>?, ICollection<string>?, string?, TaskStatus, CancellationToken)
Abort all tasks and results that depend directly or indirectly of the specified tasks
public static Task AbortTasksAndResults(ITaskTable taskTable, IResultTable resultTable, ICollection<string>? taskIds = null, ICollection<string>? resultIds = null, string? reason = null, TaskStatus status = TaskStatus.Error, CancellationToken cancellationToken = default)
21.222.3.1.1. Parameters
taskTable ITaskTable
Interface to manage task states
resultTable IResultTable
Interface to manage result states
taskIds ICollection<string>?
Root tasks that must be aborted
resultIds ICollection<string>?
Root results that must be aborted
reason string?
Abortion message
status TaskStatus
Put aborted tasks into the given status
cancellationToken CancellationToken
Token used to cancel the execution of the method
21.222.3.1.2. Returns
Task representing the asynchronous execution of the method
21.222.3.2. DeleteResultAsync(IResultTable, IObjectStorage, string, CancellationToken)
Delete the result
public static Task DeleteResultAsync(IResultTable resultTable, IObjectStorage objectStorage, string resultId, CancellationToken cancellationToken)
21.222.3.2.1. Parameters
resultTable IResultTable
Interface to manage result states
objectStorage IObjectStorage
Interface to manage objects
resultId string
ID of the result to delete
cancellationToken CancellationToken
Token used to cancel the execution of the method
21.222.3.2.2. Returns
21.222.3.3. PurgeResultsAsync(IResultTable, IObjectStorage, string, CancellationToken)
Delete all results for a given session
public static Task PurgeResultsAsync(IResultTable resultTable, IObjectStorage objectStorage, string sessionId, CancellationToken cancellationToken)
21.222.3.3.1. Parameters
resultTable IResultTable
Interface to manage result states
objectStorage IObjectStorage
Interface to manage objects
sessionId string
ID of the session to purge
cancellationToken CancellationToken
Token used to cancel the execution of the method
21.222.3.3.2. Returns
Task representing the asynchronous execution of the method
21.222.3.3.3. Remarks
This method will delete all results that are in the Completed, Created or Aborted state and their deletion is managed by ArmoniK. It will also delete the associated objects in the object storage.