17.215. Class ResultTableExtensions
Namespace: ArmoniK.Core.Common.Storage
Assembly: ArmoniK.Core.Common.dll
public static class ResultTableExtensions
17.215.1. Inheritance
17.215.2. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
17.215.3. Methods
17.215.3.1. AbortSessionResults(IResultTable, string, CancellationToken)
Abort the results of the given session
public static Task AbortSessionResults(this IResultTable resultTable, string sessionId, CancellationToken cancellationToken = default)
17.215.3.1.1. Parameters
resultTable IResultTable
Interface to manage results
sessionId string
id of the session containing the results
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.1.2. Returns
Task representing the asynchronous execution of the method
17.215.3.2. AbortTaskResults(IResultTable, string, string, CancellationToken)
Abort the results of the given task
public static Task AbortTaskResults(this IResultTable resultTable, string sessionId, string ownerTaskId, CancellationToken cancellationToken = default)
17.215.3.2.1. Parameters
resultTable IResultTable
Interface to manage results
sessionId string
id of the session containing the results
ownerTaskId string
id of the task from which abort the results
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.2.2. Returns
Task representing the asynchronous execution of the method
17.215.3.3. BulkUpdateResults(IResultTable, IEnumerable<(string resultId, UpdateDefinition<Result> updates)>, CancellationToken)
Updates in bulk results
public static Task<long> BulkUpdateResults(this IResultTable resultTable, IEnumerable<(string resultId, UpdateDefinition<Result> updates)> bulkUpdates, CancellationToken cancellationToken)
17.215.3.3.1. Parameters
resultTable IResultTable
Interface to manage result lifecycle
bulkUpdates IEnumerable<(string resultId, UpdateDefinition<Result> updates)>
Enumeration of updates with the resultId they apply on
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.3.2. Returns
The number of result matched
17.215.3.4. CompleteManyResults(IResultTable, IEnumerable<(string resultId, long size, byte[] opaqueId)>, CancellationToken)
Complete many results in the database
public static Task CompleteManyResults(this IResultTable resultTable, IEnumerable<(string resultId, long size, byte[] opaqueId)> results, CancellationToken cancellationToken = default)
17.215.3.4.1. Parameters
resultTable IResultTable
Interface to manage results
results IEnumerable<(string resultId, long size, byte[] opaqueId)>
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.4.2. Returns
The new version of the result metadata
17.215.3.4.3. Exceptions
when result to update is not found
17.215.3.5. CompleteResult(IResultTable, string, string, long, byte[], CancellationToken)
Complete result
public static Task<Result> CompleteResult(this IResultTable resultTable, string sessionId, string resultId, long size, byte[] opaqueId, CancellationToken cancellationToken = default)
17.215.3.5.1. Parameters
resultTable IResultTable
Interface to manage results
sessionId string
id of the session containing the results
resultId string
Id of the result to complete
size long
Size of the result to complete
opaqueId byte[]
Opaque unique identifier representing the object
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.5.2. Returns
The new version of the result metadata
17.215.3.5.3. Exceptions
when result to update is not found
17.215.3.6. GetDependents(IResultTable, string, string, CancellationToken)
Get the list of task that depends on the result
public static Task<IEnumerable<string>> GetDependents(this IResultTable resultTable, string sessionId, string resultId, CancellationToken cancellationToken = default)
17.215.3.6.1. Parameters
resultTable IResultTable
Interface to manage results
sessionId string
Id of the session containing the result
resultId string
Id of the result
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.6.2. Returns
Ids of the task dependent on this result
17.215.3.7. GetResultStatus(IResultTable, IEnumerable<string>, string, CancellationToken)
Get the status of the given results
public static Task<IEnumerable<ResultIdStatus>> GetResultStatus(this IResultTable resultTable, IEnumerable<string> ids, string sessionId, CancellationToken cancellationToken = default)
17.215.3.7.1. Parameters
resultTable IResultTable
Interface to manage results
ids IEnumerable<string>
ids of the results
sessionId string
id of the session containing the results
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.7.2. Returns
Task<IEnumerable<ResultIdStatus>>
A map between the ids of the results found and their status
17.215.3.8. GetResults(IResultTable, string, IEnumerable<string>, CancellationToken)
Get the results from a collection of ids
public static IAsyncEnumerable<Result> GetResults(this IResultTable resultTable, string sessionId, IEnumerable<string> keys, CancellationToken cancellationToken = default)
17.215.3.8.1. Parameters
resultTable IResultTable
Interface to manage results
sessionId string
id of the session containing the result
keys IEnumerable<string>
Collection of id of the result to be retrieved
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.8.2. Returns
Collection of results metadata from the database
17.215.3.9. MarkAsDeleted(IResultTable, string, CancellationToken)
Set the result status to
public static Task MarkAsDeleted(this IResultTable resultTable, string resultId, CancellationToken cancellationToken = default)
17.215.3.9.1. Parameters
resultTable IResultTable
Interface to manage results
resultId string
Id of the result to update
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.9.2. Returns
Task representing the asynchronous execution of the method
17.215.3.10. SetResult(IResultTable, string, string, string, long, byte[], CancellationToken)
Update result
public static Task SetResult(this IResultTable resultTable, string sessionId, string ownerTaskId, string resultId, long size, byte[] opaqueId, CancellationToken cancellationToken = default)
17.215.3.10.1. Parameters
resultTable IResultTable
Interface to manage results
sessionId string
id of the session containing the results
ownerTaskId string
id of the task owning the result
resultId string
id of the result to be modified
size long
Size of the result to be modified
opaqueId byte[]
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.215.3.10.2. Returns
Task representing the asynchronous execution of the method