StatefulServiceBase.onDataLossAsync(RestoreContext context, CancellationToken cancellationToken) 方法

定义

This method is called during suspected data loss. You can override this method to restore the service in case of data loss.

protected CompletableFuture<Boolean> onDataLossAsync(RestoreContext context, CancellationToken cancellationToken)

参数

context
RestoreContext

A RestoreContext to be used to restore the service.

cancellationToken
CancellationToken

CancellationToken object to indicate the cancellation status of the operation.

返回

CompletableFuture<Boolean>

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.

适用于