KeyValueStoreReplica.ChangeRoleAsync(ReplicaRole, 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.
Changes the replica role of the replica and its replicator.
public System.Threading.Tasks.Task<string> ChangeRoleAsync (System.Fabric.ReplicaRole newRole, System.Threading.CancellationToken cancellationToken);
abstract member ChangeRoleAsync : System.Fabric.ReplicaRole * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.ChangeRoleAsync : System.Fabric.ReplicaRole * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function ChangeRoleAsync (newRole As ReplicaRole, cancellationToken As CancellationToken) As Task(Of String)
Parameters
- newRole
- ReplicaRole
The target replica role.
- cancellationToken
- CancellationToken
Currently unused. Reserved for future use.
Returns
A task whose result is the address of this replica.
Implements
Remarks
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 OnChangeRoleAsync(ReplicaRole, CancellationToken) instead.