TestabilityExtensions.RestartReplicaAsync Method (FabricClient.ServiceManagementClient, String, Guid, Int64, CompletionMode, CancellationToken)

 

This API will restart the replica (equivalent of ReportFault - Temporary) specified by the passed in ReplicaSelector.

Namespace:   System.Fabric.Testability
Assembly:  System.Fabric.Testability (in System.Fabric.Testability.dll)

Syntax

public static Task<RestartReplicaResult> RestartReplicaAsync(
    this FabricClient.ServiceManagementClient serviceManagementClient,
    string nodeName,
    Guid partitionId,
    long replicaId,
    CompletionMode completionMode,
    CancellationToken token
)

Parameters

  • partitionId
    Type: System.Guid

    Partition Id where the replica needs to be restarted

  • replicaId
    Type: System.Int64

    Replica Id that needs to be restarted

  • completionMode
    Type: System.Fabric.Testability.CompletionMode

    The CompletionMode that specifies whether to wait until the restart of the replica is complete or not DoNotVerify - Return after triggering the restart of the replica Verify - Return after the remove completes

Return Value

Type: System.Threading.Tasks.Task<RestartReplicaResult>

RestartReplicaResult which gives information about the actual selected replica.

Exceptions

Exception Condition
TimeoutException

Action took more than its allocated time.

ArgumentNullException

Any of the required arguments are null.

FabricException

These are the fabric failures FabricErrorCode.ReplicaDoesNotExist - If the Selected replica was not found FabricErrorCode.PartitionNotFound - if the specified partition selected does not exist.

See Also

RestartReplicaAsync Overload
TestabilityExtensions Class
System.Fabric.Testability Namespace

Return to top