Table of Contents

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

Task<object>

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

Task<object>

DeleteStoreAsync()

Deletes instances instance store

Task DeleteStoreAsync()

Returns

Task

GetEntitiesAsync(string, string)

Get a list of state events from instance store

Task<IEnumerable<OrchestrationStateInstanceEntity>> GetEntitiesAsync(string instanceId, string executionId)

Parameters

instanceId string

The instance id to return state for

executionId string

The 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 string

The instance id to return history for

executionId string

The 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 string

The instance id to return state for

allInstances bool

Flag 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 string

The instance id to return state for

executionId string

The 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 bool

Flag to indicate whether the store should be recreated.

Returns

Task

PurgeOrchestrationHistoryEventsAsync(DateTime, OrchestrationStateTimeRangeFilterType)

Purges history from storage for given time range

Task<int> PurgeOrchestrationHistoryEventsAsync(DateTime thresholdDateTimeUtc, OrchestrationStateTimeRangeFilterType timeRangeFilterType)

Parameters

thresholdDateTimeUtc DateTime

The datetime in UTC to use as the threshold for purging history

timeRangeFilterType OrchestrationStateTimeRangeFilterType

What to compare the threshold date time against

Returns

Task<int>

The number of history events purged.

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

Task<object>

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

Returns

Task<object>