Delen via


ReplicaSelector Class

Definition

This is a helper class for selecting replicas.

[System.Serializable]
public class ReplicaSelector
[<System.Serializable>]
type ReplicaSelector = class
Public Class ReplicaSelector
Inheritance
ReplicaSelector
Attributes

Remarks

It allows the user to select replicas to be targeted by the testability APIs. The selection can be a particular replica of a partition based on the ReplicaId or Role or a random replica of the partition.

Properties

PartitionSelector

The PartitionSelector specifying the partition for which the replica is being selected by the ReplicaSelector.

Methods

Equals(Object)

Compares whether two ReplicaSelectors are the same.

GetHashCode()

Calls the base GetHashCode()

PrimaryOf(PartitionSelector)

Selects the primary replica for the given partition specified by the PartitionSelector.

RandomOf(PartitionSelector)

Selects a random replica for the given partition specified by the PartitionSelector.

RandomSecondaryOf(PartitionSelector)

Selects a random secondary replica for the given partition specified by the PartitionSelector.

ReplicaIdOf(PartitionSelector, Int64)

Selects a replica based on the ReplicaId for the given partition specified by the PartitionSelector.

ToString()

String representation of the replica selector.

Applies to