StatefulServiceBase.OnDataLossAsync(RestoreContext, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This method is called during suspected data loss. You can override this method to restore the service in case of data loss.
protected virtual System.Threading.Tasks.Task<bool> OnDataLossAsync (Microsoft.ServiceFabric.Data.RestoreContext restoreCtx, System.Threading.CancellationToken cancellationToken);
abstract member OnDataLossAsync : Microsoft.ServiceFabric.Data.RestoreContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.OnDataLossAsync : Microsoft.ServiceFabric.Data.RestoreContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Protected Overridable Function OnDataLossAsync (restoreCtx As RestoreContext, cancellationToken As CancellationToken) As Task(Of Boolean)
Parameters
- restoreCtx
- RestoreContext
A RestoreContext to be used to restore the service.
- cancellationToken
- CancellationToken
CancellationToken to monitor for cancellation requests.
Returns
A Task that represents the asynchronous restore operation. True indicates that the state has been restored. False indicates that the replica's state has not been modified.
Applies to
Azure SDK for .NET
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin