Interface IFlowModelStorageService<T>
Storage service for execution model items.
Namespace: DNVGL.One.Compute.Core.FlowModel
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public interface IFlowModelStorageService<T> where T : class, IFlowModelItem
Type Parameters
Name | Description |
---|---|
T | Item type. |
Methods
View SourceDeleteItemsAsync(string)
Deletes the items of the given job.
Declaration
Task DeleteItemsAsync(string jobId)
Parameters
Type | Name | Description |
---|---|---|
string | jobId | The job identifier. |
Returns
Type | Description |
---|---|
Task | Asynchronous Task. |
GetItem(string, string)
Gets the item.
Declaration
T GetItem(string jobId, string workItemId)
Parameters
Type | Name | Description |
---|---|---|
string | jobId | The job identifier. |
string | workItemId | The work item identifier. |
Returns
Type | Description |
---|---|
T | The item. |
GetItemAsync(string, string)
Gets the item.
Declaration
Task<T> GetItemAsync(string jobId, string workItemId)
Parameters
Type | Name | Description |
---|---|---|
string | jobId | The job identifier. |
string | workItemId | The work item identifier. |
Returns
Type | Description |
---|---|
Task<T> | The item. |
GetItemProperties(string, string, int)
Get the properties of the work items of the given job.
Declaration
IEnumerable<FlowModelItemProperties> GetItemProperties(string jobId, string parentId = null, int batchNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
string | jobId | The job identifier. |
string | parentId | The parent identifier. |
int | batchNumber | The batch number. |
Returns
Type | Description |
---|---|
IEnumerable<FlowModelItemProperties> | Work item properties of the job. |
Remarks
The batch number identifies a group of items that should be executed by the same worker in batch. The batch number is unique only for given job and parent ids. batchNumber 0 (default) returns all items of with the given parent id.
GetItems(string, string, int)
Get the work items of the given job.
Declaration
IEnumerable<T> GetItems(string jobId, string parentId = null, int batchNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
string | jobId | The job identifier. |
string | parentId | The parent identifier. |
int | batchNumber | The batch number. |
Returns
Type | Description |
---|---|
IEnumerable<T> | Work items of the job. |
Remarks
The batch number identifies a group of items that should be executed by the same worker in batch. The batch number is unique only for given job and parent ids.
SaveItemAsync(T)
Saves the work item.
Declaration
Task SaveItemAsync(T workItem)
Parameters
Type | Name | Description |
---|---|---|
T | workItem | The work item. |
Returns
Type | Description |
---|---|
Task | Asynchronous Task. |
SaveItemsAsync(IEnumerable<T>)
Saves the work items.
Declaration
Task SaveItemsAsync(IEnumerable<T> workItems)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | workItems | The work items. |
Returns
Type | Description |
---|---|
Task | Asynchronous Task. |