Share via


KeyValueStoreReplica.CloseAsync(CancellationToken) Method

Definition

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