TestabilityExtensions.StopNodeAsync Method (FabricClient.ClusterManagementClient, String, BigInteger, CompletionMode, CancellationToken)
Stops a cluster node.
Namespace: System.Fabric.Testability
Assembly: System.Fabric.Testability (in System.Fabric.Testability.dll)
Syntax
public static Task<StopNodeResult> StopNodeAsync(
this FabricClient.ClusterManagementClient clusterManagementClient,
string nodeName,
BigInteger nodeInstance,
CompletionMode completionMode,
CancellationToken token
)
Parameters
clusterManagementClient
Type: System.Fabric.FabricClient.ClusterManagementClientThe source FabricClient.ClusterManagementClient on which this action is invoked.
nodeName
Type: System.StringThe node name of the node to stop.
nodeInstance
Type: System.Numerics.BigIntegerThe node instance ID of the node to stop. If this is not specified, or is set to 0, this is ignored. If this is set to -1, the system will internally determine this value.
completionMode
Type: System.Fabric.Testability.CompletionModeIf set to Verify, the system will check that the node stopped, and the API will not return until it has. If set to DoNotVerify, the API returns once the node stop has been initiated.
token
Type: System.Threading.CancellationTokenThe cancellation token.
Return Value
Type: System.Threading.Tasks.Task<StopNodeResult>
A task with information representing the target node.
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. |
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
StopNodeAsync Overload
TestabilityExtensions Class
System.Fabric.Testability Namespace
Return to top