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 |
|---|---|---|
| System.String | jobId | The job identifier. |
Returns
| Type | Description |
|---|---|
| Task | Asynchronous |
GetItem(String, String)
Gets the item.
Declaration
T GetItem(string jobId, string workItemId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | jobId | The job identifier. |
| System.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 |
|---|---|---|
| System.String | jobId | The job identifier. |
| System.String | workItemId | The work item identifier. |
Returns
| Type | Description |
|---|---|
| Task<T> | The item |
GetItemProperties(String, String, Int32)
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 |
|---|---|---|
| System.String | jobId | The job identifier. |
| System.String | parentId | The parent identifier. |
| System.Int32 | 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, Int32)
Get the work items of the given job.
Declaration
IEnumerable<T> GetItems(string jobId, string parentId = null, int batchNumber = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | jobId | The job identifier. |
| System.String | parentId | The parent identifier. |
| System.Int32 | 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 |
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 |