Interface IOrchestrationServiceInstanceStore
- Namespace
- DurableTask.Core
- Assembly
- DurableTask.Core.dll
Instance Store provider interface to allow storage and lookup for orchestration state and event history
public interface IOrchestrationServiceInstanceStore
Properties
MaxHistoryEntryLength
Gets the maximum length a history entry can be so it can be truncated if necessary
int MaxHistoryEntryLength { get; }
Property Value
- int
The maximum length
Methods
DeleteEntitiesAsync(IEnumerable<InstanceEntityBase>)
Deletes a list of history events from instance store
Task<object> DeleteEntitiesAsync(IEnumerable<InstanceEntityBase> entities)
Parameters
entities
IEnumerable<InstanceEntityBase>List of history events to delete
Returns
DeleteJumpStartEntitiesAsync(IEnumerable<OrchestrationJumpStartInstanceEntity>)
Deletes a list of jump start events from instance store
Task<object> DeleteJumpStartEntitiesAsync(IEnumerable<OrchestrationJumpStartInstanceEntity> entities)
Parameters
entities
IEnumerable<OrchestrationJumpStartInstanceEntity>List of jump start events to delete
Returns
DeleteStoreAsync()
Deletes instances instance store
Task DeleteStoreAsync()
Returns
GetEntitiesAsync(string, string)
Get a list of state events from instance store
Task<IEnumerable<OrchestrationStateInstanceEntity>> GetEntitiesAsync(string instanceId, string executionId)
Parameters
instanceId
stringThe instance id to return state for
executionId
stringThe execution id to return state for
Returns
- Task<IEnumerable<OrchestrationStateInstanceEntity>>
The matching orchestration state or null if not found
GetJumpStartEntitiesAsync(int)
Get a list of jump start events from instance store
Task<IEnumerable<OrchestrationJumpStartInstanceEntity>> GetJumpStartEntitiesAsync(int top)
Parameters
top
int
Returns
- Task<IEnumerable<OrchestrationJumpStartInstanceEntity>>
List of jump start events
GetOrchestrationHistoryEventsAsync(string, string)
Gets the list of history events for a given instance and execution id
Task<IEnumerable<OrchestrationWorkItemInstanceEntity>> GetOrchestrationHistoryEventsAsync(string instanceId, string executionId)
Parameters
instanceId
stringThe instance id to return history for
executionId
stringThe execution id to return history for
Returns
- Task<IEnumerable<OrchestrationWorkItemInstanceEntity>>
List of history events
GetOrchestrationStateAsync(string, bool)
Gets a list of orchestration states for a given instance
Task<IEnumerable<OrchestrationStateInstanceEntity>> GetOrchestrationStateAsync(string instanceId, bool allInstances)
Parameters
instanceId
stringThe instance id to return state for
allInstances
boolFlag indication whether to get all history execution ids or just the most recent
Returns
- Task<IEnumerable<OrchestrationStateInstanceEntity>>
List of matching orchestration states
GetOrchestrationStateAsync(string, string)
Gets the orchestration state for a given instance and execution id
Task<OrchestrationStateInstanceEntity> GetOrchestrationStateAsync(string instanceId, string executionId)
Parameters
instanceId
stringThe instance id to return state for
executionId
stringThe execution id to return state for
Returns
- Task<OrchestrationStateInstanceEntity>
The matching orchestration state or null if not found
InitializeStoreAsync(bool)
Runs initialization to prepare the instance store for use
Task InitializeStoreAsync(bool recreate)
Parameters
recreate
boolFlag to indicate whether the store should be recreated.
Returns
PurgeOrchestrationHistoryEventsAsync(DateTime, OrchestrationStateTimeRangeFilterType)
Purges history from storage for given time range
Task<int> PurgeOrchestrationHistoryEventsAsync(DateTime thresholdDateTimeUtc, OrchestrationStateTimeRangeFilterType timeRangeFilterType)
Parameters
thresholdDateTimeUtc
DateTimeThe datetime in UTC to use as the threshold for purging history
timeRangeFilterType
OrchestrationStateTimeRangeFilterTypeWhat to compare the threshold date time against
Returns
WriteEntitiesAsync(IEnumerable<InstanceEntityBase>)
Writes a list of history events to instance store
Task<object> WriteEntitiesAsync(IEnumerable<InstanceEntityBase> entities)
Parameters
entities
IEnumerable<InstanceEntityBase>List of history events to write
Returns
WriteJumpStartEntitiesAsync(IEnumerable<OrchestrationJumpStartInstanceEntity>)
Writes a list of jump start events to instance store
Task<object> WriteJumpStartEntitiesAsync(IEnumerable<OrchestrationJumpStartInstanceEntity> entities)
Parameters
entities
IEnumerable<OrchestrationJumpStartInstanceEntity>List of jump start events to write