KeyValueStoreReplica.CloseAsync(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.
Closes the replica and its replicator in preparation for going offline from a replica set.
public System.Threading.Tasks.Task CloseAsync (System.Threading.CancellationToken cancellationToken);
abstract member CloseAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.CloseAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function CloseAsync (cancellationToken As CancellationToken) As Task
Parameters
- cancellationToken
- CancellationToken
Currently unused. Reserved for future use.
Returns
A task that represents the asynchronous operation.
Implements
Remarks
The replica has not necessarily been removed permanently from the replica set and may be re-opened at a later time. The most common causes for closing a replica is graceful shutdown in preparation for upgrade or load balancing. This method does not need to be called explicitly if the application replica derives from KeyValueStoreReplica, which is the recommended pattern. In this case, the application replica should override OnCloseAsync(CancellationToken) instead.
Applies to
Azure SDK for .NET