Share via


StatefulServiceBase.OnChangeRoleAsync(ReplicaRole, CancellationToken) Method

Definition

This method is called when role of the replica is changing and it is the final step before completing ChangeRoleAsync(ReplicaRole, CancellationToken). Override this method to be notified that ChangeRole has completed for this replica's internal components.

For information about Reliable Services life cycle please see https://docs.microsoft.com/azure/service-fabric/service-fabric-reliable-services-lifecycle

protected virtual System.Threading.Tasks.Task OnChangeRoleAsync (System.Fabric.ReplicaRole newRole, System.Threading.CancellationToken cancellationToken);
abstract member OnChangeRoleAsync : System.Fabric.ReplicaRole * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnChangeRoleAsync : System.Fabric.ReplicaRole * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnChangeRoleAsync (newRole As ReplicaRole, cancellationToken As CancellationToken) As Task

Parameters

newRole
ReplicaRole

New ReplicaRole for this service replica.

cancellationToken
CancellationToken

Cancellation token to monitor for cancellation requests.

Returns

A Task that represents outstanding operation.

Applies to