TestabilityExtensions.RemoveReplicaAsync Method (FabricClient.ServiceManagementClient, ReplicaSelector, CompletionMode, Boolean, TimeSpan, CancellationToken)

 

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

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

Syntax

public static Task<RemoveReplicaResult> RemoveReplicaAsync(
    this FabricClient.ServiceManagementClient serviceManagementClient,
    ReplicaSelector replicaSelector,
    CompletionMode completionMode,
    bool forceRemove,
    TimeSpan operationTimeout,
    CancellationToken token
)

Parameters

  • completionMode
    Type: System.Fabric.Testability.CompletionMode

    The CompletionMode that specifies whether to wait until the remove of the replica is complete or not DoNotVerify - Return after triggering the remove of the replica Verify - Return after the remove completes i.e. the replica is out of the FM view.

  • forceRemove
    Type: System.Boolean

    Will forcefully remove the replica.

  • operationTimeout
    Type: System.TimeSpan

    The overall timeout for the operation including the timeout to wait for replica to be removed if CompletionMode is Verify

Return Value

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

RemoveReplicaResult 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

RemoveReplicaAsync Overload
TestabilityExtensions Class
System.Fabric.Testability Namespace

Return to top