21.215. Class ResultLifeCycleHelper

Namespace: ArmoniK.Core.Common.Storage
Assembly: ArmoniK.Core.Common.dll

Helper to manage Results

public static class ResultLifeCycleHelper

21.215.1. Inheritance

objectResultLifeCycleHelper

21.215.2. Inherited Members

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

21.215.3. Methods

21.215.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.215.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.215.3.1.2. Returns

Task

Task representing the asynchronous execution of the method

21.215.3.2. DeleteResultAsync(IResultTable, IObjectStorage, string, CancellationToken)

Delete the result

public static Task DeleteResultAsync(IResultTable resultTable, IObjectStorage objectStorage, string resultId, CancellationToken cancellationToken)

21.215.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.215.3.2.2. Returns

Task

21.215.3.3. PurgeResultsAsync(IResultTable, IObjectStorage, string, CancellationToken)

public static Task PurgeResultsAsync(IResultTable resultTable, IObjectStorage objectStorage, string sessionId, CancellationToken cancellationToken)

21.215.3.3.1. Parameters

resultTable IResultTable

objectStorage IObjectStorage

sessionId string

cancellationToken CancellationToken

21.215.3.3.2. Returns

Task