-
Notifications
You must be signed in to change notification settings - Fork 328
Expand file tree
/
Copy pathTrackingStoreBase.cs
More file actions
115 lines (93 loc) · 5.47 KB
/
Copy pathTrackingStoreBase.cs
File metadata and controls
115 lines (93 loc) · 5.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// ----------------------------------------------------------------------------------
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------
namespace DurableTask.AzureStorage.Tracking
{
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using DurableTask.Core;
using DurableTask.Core.History;
abstract class TrackingStoreBase : ITrackingStore
{
/// <inheritdoc />
public abstract Task CreateAsync(CancellationToken cancellationToken = default);
/// <inheritdoc />
public abstract Task DeleteAsync(CancellationToken cancellationToken = default);
/// <inheritdoc />
public virtual Task<bool> ExistsAsync(CancellationToken cancellationToken = default)
{
throw new NotSupportedException();
}
/// <inheritdoc />
public abstract Task<OrchestrationHistory> GetHistoryEventsAsync(string instanceId, string expectedExecutionId, CancellationToken cancellationToken = default);
/// <inheritdoc />
public virtual IAsyncEnumerable<string> RewindHistoryAsync(string instanceId, CancellationToken cancellationToken = default)
{
throw new NotSupportedException();
}
/// <inheritdoc />
public abstract Task<InstanceStatus> FetchInstanceStatusAsync(string instanceId, CancellationToken cancellationToken = default);
/// <inheritdoc />
public abstract IAsyncEnumerable<OrchestrationState> GetStateAsync(string instanceId, bool allExecutions, bool fetchInput, CancellationToken cancellationToken = default);
/// <inheritdoc />
public abstract Task<OrchestrationState> GetStateAsync(string instanceId, string executionId, bool fetchInput, CancellationToken cancellationToken = default);
/// <inheritdoc />
public virtual IAsyncEnumerable<OrchestrationState> GetStateAsync(CancellationToken cancellationToken = default)
{
throw new NotSupportedException();
}
/// <inheritdoc />
public virtual IAsyncEnumerable<OrchestrationState> GetStateAsync(IEnumerable<string> instanceIds, CancellationToken cancellationToken = default)
{
throw new NotSupportedException();
}
/// <inheritdoc />
public virtual AsyncPageable<OrchestrationState> GetStateAsync(DateTime createdTimeFrom, DateTime? createdTimeTo, IEnumerable<OrchestrationStatus> runtimeStatus, CancellationToken cancellationToken = default)
{
throw new NotSupportedException();
}
public virtual AsyncPageable<OrchestrationState> GetStateAsync(OrchestrationInstanceStatusQueryCondition condition, CancellationToken cancellationToken = default)
{
throw new NotSupportedException();
}
/// <inheritdoc />
public abstract Task PurgeHistoryAsync(DateTime thresholdDateTimeUtc, OrchestrationStateTimeRangeFilterType timeRangeFilterType, CancellationToken cancellationToken = default);
/// <inheritdoc />
public virtual Task<PurgeHistoryResult> PurgeInstanceHistoryAsync(string instanceId, CancellationToken cancellationToken = default)
{
throw new NotSupportedException();
}
/// <inheritdoc />
public virtual Task<PurgeHistoryResult> PurgeInstanceHistoryAsync(DateTime createdTimeFrom, DateTime? createdTimeTo, IEnumerable<OrchestrationStatus> runtimeStatus, CancellationToken cancellationToken = default)
{
throw new NotSupportedException();
}
/// <inheritdoc />
public abstract Task<bool> SetNewExecutionAsync(ExecutionStartedEvent executionStartedEvent, ETag? eTag, string inputStatusOverride, CancellationToken cancellationToken = default);
/// <inheritdoc />
public virtual Task UpdateStatusForRewindAsync(string instanceId, CancellationToken cancellationToken = default)
{
throw new NotSupportedException();
}
/// <inheritdoc />
public abstract Task UpdateStatusForTerminationAsync(string instanceId, string output, DateTime lastUpdatedTime, CancellationToken cancellationToken = default);
/// <inheritdoc />
public abstract Task StartAsync(CancellationToken cancellationToken = default);
/// <inheritdoc />
public abstract Task<ETag?> UpdateStateAsync(OrchestrationRuntimeState newRuntimeState, OrchestrationRuntimeState oldRuntimeState, string instanceId, string executionId, ETag? eTag, object executionData, CancellationToken cancellationToken = default);
/// <inheritdoc />
public abstract Task UpdateInstanceStatusAndDeleteOrphanedBlobsForCompletedOrchestrationAsync(string instanceId, string executionId, OrchestrationRuntimeState runtimeState, object trackingStoreContext, CancellationToken cancellationToken = default);
}
}