-
Notifications
You must be signed in to change notification settings - Fork 264
/
RestoreContext.xml
207 lines (203 loc) · 17.2 KB
/
RestoreContext.xml
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<Type Name="RestoreContext" FullName="Microsoft.ServiceFabric.Data.RestoreContext">
<TypeSignature Language="C#" Value="public struct RestoreContext" />
<TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit RestoreContext extends System.ValueType" />
<TypeSignature Language="DocId" Value="T:Microsoft.ServiceFabric.Data.RestoreContext" />
<TypeSignature Language="VB.NET" Value="Public Structure RestoreContext" />
<TypeSignature Language="F#" Value="type RestoreContext = struct" />
<AssemblyInfo>
<AssemblyName>Microsoft.ServiceFabric.Data.Interfaces</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
<cref name="RestoreContext" /> contains the <cref name="RestoreContext.RestoreAsync(RestoreDescription)" /> that can be used to restore the state of the replica from a backup.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public RestoreContext (Microsoft.ServiceFabric.Data.IStateProviderReplica stateProviderReplica);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class Microsoft.ServiceFabric.Data.IStateProviderReplica stateProviderReplica) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.ServiceFabric.Data.RestoreContext.#ctor(Microsoft.ServiceFabric.Data.IStateProviderReplica)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (stateProviderReplica As IStateProviderReplica)" />
<MemberSignature Language="F#" Value="new Microsoft.ServiceFabric.Data.RestoreContext : Microsoft.ServiceFabric.Data.IStateProviderReplica -> Microsoft.ServiceFabric.Data.RestoreContext" Usage="new Microsoft.ServiceFabric.Data.RestoreContext stateProviderReplica" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.ServiceFabric.Data.Interfaces</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="stateProviderReplica" Type="Microsoft.ServiceFabric.Data.IStateProviderReplica" />
</Parameters>
<Docs>
<param name="stateProviderReplica">
An <see cref="T:Microsoft.ServiceFabric.Data.IStateProviderReplica" /> representing a reliable state provider replica.
</param>
<summary>
Initializes a new instance of the <cref name="RestoreContext" /> structure.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RestoreAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task RestoreAsync (Microsoft.ServiceFabric.Data.RestoreDescription restoreDescription);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Threading.Tasks.Task RestoreAsync(valuetype Microsoft.ServiceFabric.Data.RestoreDescription restoreDescription) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.ServiceFabric.Data.RestoreContext.RestoreAsync(Microsoft.ServiceFabric.Data.RestoreDescription)" />
<MemberSignature Language="VB.NET" Value="Public Function RestoreAsync (restoreDescription As RestoreDescription) As Task" />
<MemberSignature Language="F#" Value="member this.RestoreAsync : Microsoft.ServiceFabric.Data.RestoreDescription -> System.Threading.Tasks.Task" Usage="restoreContext.RestoreAsync restoreDescription" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.ServiceFabric.Data.Interfaces</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="restoreDescription" Type="Microsoft.ServiceFabric.Data.RestoreDescription" />
</Parameters>
<Docs>
<param name="restoreDescription">Description for the restore request.</param>
<summary>
Restores a backup described by <see cref="T:Microsoft.ServiceFabric.Data.RestoreDescription" />.
</summary>
<returns>
Task that represents the asynchronous restore operation.
</returns>
<remarks>
This API must be called from OnDataLossAsync method. Only one RestoreAsync API can be inflight per replica at any given point of time.
Note that exceptions thrown by this API differ depending on of underlying state provider. The exceptions that are currently documented for
this API applies only to out-of-box state providers provided by Service Fabric for Reliable Services and Reliable Actors.
<para>
Following exceptions are thrown by this API when invoked in Reliable Service:
<list type="bullet"><item><description><see cref="T:System.Fabric.FabricMissingFullBackupException" /></description></item><item><description><see cref="T:System.ArgumentException" /></description></item></list></para><para>
Following exceptions are thrown by this API when invoked in Actor Service with KvsActorStateProvider as its state provider (which is the
default state provider for Reliable Actors):
<list type="bullet"><item><description><see cref="T:System.ArgumentException" /></description></item><item><description><see cref="T:System.IO.DirectoryNotFoundException" /></description></item><item><description><see cref="T:System.Fabric.FabricObjectClosedException" /></description></item><item><description><see cref="T:System.InvalidOperationException" /></description></item><item><description><see cref="T:System.IO.FileNotFoundException" /></description></item><item><description><see cref="T:System.Fabric.FabricException" /></description></item></list></para></remarks>
<exception cref="T:System.Fabric.FabricMissingFullBackupException">
Indicates that the input backup folder does not contain a full backup.
For a backup folder to be restorable, it must contain exactly one full backup and any number of incremental backups.
</exception>
<exception cref="T:System.ArgumentException">
Indicates that one of the arguments is not valid. For example, when restoring a Reliable Service if RestorePolicy is set to Safe,
but the input backup folder contains a version of the state that is older than the state maintained in the current replica.
When restoring an Actor Service this exception is thrown if specified <see cref="P:Microsoft.ServiceFabric.Data.RestoreDescription.BackupFolderPath" />
is empty.
</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
Indicates that the supplied restore directory does not exist.
</exception>
<exception cref="T:System.Fabric.FabricObjectClosedException">
Indicates that the replica is closing.
</exception>
<exception cref="T:System.InvalidOperationException">
Indicates that current restore operation is not valid. For example, the <see cref="T:System.Fabric.ServicePartitionKind" />
of the partition from where backup was taken is different than that of current partition being restored.
</exception>
<exception cref="T:System.IO.FileNotFoundException">
Indicates the expected backup files under the supplied restore directory is not found.
</exception>
<exception cref="T:System.Fabric.FabricException">
Indicates either the restore operation encountered an unexpected error or the backup files in restore directory are not valid.
The <see cref="P:System.Fabric.FabricException.ErrorCode" /> property indicates the type of error that occurred.
<list type="bullet"><item><term><see cref="F:System.Fabric.FabricErrorCode.InvalidBackup" /></term><description>
Indicates that the backup files supplied in the restore directory are either missing files or have extra unexpected files.
</description></item><item><term><see cref="F:System.Fabric.FabricErrorCode.InvalidRestoreData" /></term><description>
Indicates that metadata files (restore.dat) present in restore directory is either corrupt or contains invalid information.
</description></item><item><term><see cref="F:System.Fabric.FabricErrorCode.InvalidBackupChain" /></term><description>
Indicates that the backup chain (i.e. one full backup and zero or more contiguous incremental backups that were taken after it)
supplied in the restore directory is broken.
</description></item><item><term><see cref="F:System.Fabric.FabricErrorCode.DuplicateBackups" /></term><description>
Indicates that the backup chain (i.e. one full backup and zero or more contiguous incremental backups that were taken after it)
supplied in the restore directory contains duplicate backups.
</description></item><item><term><see cref="F:System.Fabric.FabricErrorCode.RestoreSafeCheckFailed" /></term><description>
If <see cref="F:Microsoft.ServiceFabric.Data.RestorePolicy.Safe" /> is specified as part of <see cref="T:Microsoft.ServiceFabric.Data.RestoreDescription" />, it
indicates that the backup provided for restore has older data than currently present in service.
</description></item></list></exception>
</Docs>
</Member>
<Member MemberName="RestoreAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task RestoreAsync (Microsoft.ServiceFabric.Data.RestoreDescription restoreDescription, System.Threading.CancellationToken cancellationToken);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Threading.Tasks.Task RestoreAsync(valuetype Microsoft.ServiceFabric.Data.RestoreDescription restoreDescription, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.ServiceFabric.Data.RestoreContext.RestoreAsync(Microsoft.ServiceFabric.Data.RestoreDescription,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Function RestoreAsync (restoreDescription As RestoreDescription, cancellationToken As CancellationToken) As Task" />
<MemberSignature Language="F#" Value="member this.RestoreAsync : Microsoft.ServiceFabric.Data.RestoreDescription * System.Threading.CancellationToken -> System.Threading.Tasks.Task" Usage="restoreContext.RestoreAsync (restoreDescription, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.ServiceFabric.Data.Interfaces</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="restoreDescription" Type="Microsoft.ServiceFabric.Data.RestoreDescription" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="restoreDescription">Description for the restore request.</param>
<param name="cancellationToken">The token to monitor for cancellation requests.</param>
<summary>
Restore a backup described by <see cref="T:Microsoft.ServiceFabric.Data.RestoreDescription" />.
</summary>
<returns>
Task that represents the asynchronous restore operation.
</returns>
<remarks>
This API must be called from OnDataLossAsync method. Only one RestoreAsync API can be inflight per replica at any given point of time.
Note that exceptions thrown by this API differ depending on of underlying state provider. The exceptions that are currently documented for
this API applies only to out-of-box state providers provided by Service Fabric for Reliable Services and Reliable Actors.
<para>
Following exceptions are thrown by this API when invoked in Reliable Service:
<list type="bullet"><item><description><see cref="T:System.Fabric.FabricMissingFullBackupException" /></description></item><item><description><see cref="T:System.ArgumentException" /></description></item></list></para><para>
Following exceptions are thrown by this API when invoked in Actor Service with KvsActorStateProvider as its state provider (which is the
default state provider for Reliable Actors):
<list type="bullet"><item><description><see cref="T:System.ArgumentException" /></description></item><item><description><see cref="T:System.IO.DirectoryNotFoundException" /></description></item><item><description><see cref="T:System.Fabric.FabricObjectClosedException" /></description></item><item><description><see cref="T:System.InvalidOperationException" /></description></item><item><description><see cref="T:System.IO.FileNotFoundException" /></description></item><item><description><see cref="T:System.Fabric.FabricException" /></description></item></list></para></remarks>
<exception cref="T:System.Fabric.FabricMissingFullBackupException">
Indicates that the input backup folder does not contain a full backup.
For a backup folder to be restorable, it must contain exactly one full backup and any number of incremental backups.
</exception>
<exception cref="T:System.ArgumentException">
Indicates that one of the arguments is not valid. For example, when restoring a Reliable Service if RestorePolicy is set to Safe,
but the input backup folder contains a version of the state that is older than the state maintained in the current replica.
When restoring an Actor Service this exception is thrown if specified <see cref="P:Microsoft.ServiceFabric.Data.RestoreDescription.BackupFolderPath" />
is empty.
</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
Indicates that the supplied restore directory does not exist.
</exception>
<exception cref="T:System.Fabric.FabricObjectClosedException">
Indicates that the replica is closing.
</exception>
<exception cref="T:System.InvalidOperationException">
Indicates that current restore operation is not valid. For example, the <see cref="T:System.Fabric.ServicePartitionKind" />
of the partition from where backup was taken is different than that of current partition being restored.
</exception>
<exception cref="T:System.IO.FileNotFoundException">
Indicates the expected backup files under the supplied restore directory is not found.
</exception>
<exception cref="T:System.Fabric.FabricException">
Indicates either the restore operation encountered an unexpected error or the backup files in restore directory are not valid.
The <see cref="P:System.Fabric.FabricException.ErrorCode" /> property indicates the type of error that occurred.
<list type="bullet"><item><term><see cref="F:System.Fabric.FabricErrorCode.InvalidBackup" /></term><description>
Indicates that the backup files supplied in the restore directory are either missing files or have extra unexpected files.
</description></item><item><term><see cref="F:System.Fabric.FabricErrorCode.InvalidRestoreData" /></term><description>
Indicates that metadata files (restore.dat) present in restore directory is either corrupt or contains invalid information.
</description></item><item><term><see cref="F:System.Fabric.FabricErrorCode.InvalidBackupChain" /></term><description>
Indicates that the backup chain (i.e. one full backup and zero or more contiguous incremental backups that were taken after it)
supplied in the restore directory is broken.
</description></item><item><term><see cref="F:System.Fabric.FabricErrorCode.DuplicateBackups" /></term><description>
Indicates that the backup chain (i.e. one full backup and zero or more contiguous incremental backups that were taken after it)
supplied in the restore directory contains duplicate backups.
</description></item><item><term><see cref="F:System.Fabric.FabricErrorCode.RestoreSafeCheckFailed" /></term><description>
If <see cref="F:Microsoft.ServiceFabric.Data.RestorePolicy.Safe" /> is specified as part of <see cref="T:Microsoft.ServiceFabric.Data.RestoreDescription" />, it
indicates that the backup provided for restore has older data than currently present in service.
</description></item></list></exception>
</Docs>
</Member>
</Members>
</Type>