TestabilityExtensions.RestartNodeAsync Method (FabricClient.ClusterManagementClient, ReplicaSelector, CompletionMode, CancellationToken)
Restarts a cluster node.
Namespace: System.Fabric.Testability
Assembly: System.Fabric.Testability (in System.Fabric.Testability.dll)
Syntax
public static Task<RestartNodeResult> RestartNodeAsync(
this FabricClient.ClusterManagementClient clusterManagementClient,
ReplicaSelector replicaSelector,
CompletionMode completionMode,
CancellationToken token
)
Parameters
clusterManagementClient
Type: System.Fabric.FabricClient.ClusterManagementClientThe source FabricClient.ClusterManagementClient on which this action is invoked.
replicaSelector
Type: System.Fabric.Testability.ReplicaSelectorThis parameter is used to choose a specific replica. This replica's corresponding node will be restarted.
completionMode
Type: System.Fabric.Testability.CompletionModeIf set to Verify, the system will check that the node restarted, and the API will not return until it has and NodeStatus is Up. If set to DoNotVerify, the API returns once the node restart has been initiated.
token
Type: System.Threading.CancellationTokenThe cancellation token.
Return Value
Type: System.Threading.Tasks.Task<RestartNodeResult>
A task with information representing the target node, and the replica selected.
Exceptions
Exception | Condition |
---|---|
FabricException | The ErrorCode property will indicate the reason. If the ErrorCode is InvalidArgument, nodeName is invalid. If the errorCode is InstanceIdMismatch, the nodeInstance provided does not match the currently running instance. If the ErrorCode is ReplicaDoesNotExist, the selected replica was not found. If the ErrorCode is PartitionNotFound, the specified partition does not exist. |
TimeoutException | The operation timed out. |
ArgumentNullException | An argument with a value of null was passed in. |
Remarks
A cluster node is a process, not an virtual or physical machine.
See Also
RestartNodeAsync Overload
TestabilityExtensions Class
System.Fabric.Testability Namespace
Return to top