ReplicaSelector Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應