C# Класс AngularAzureSearch.WebAPI.Helpers.DocumentClientHashPartitioningManager

Implements methods to add or remove additional partitions and handle data migration to a HashPartitionResolver. Internally uses TransitionHashPartitionResolver to handle requests during transit.
Показать файл Открыть проект

Открытые методы

Метод Описание
AddPartition ( ) : Task

Add a partition (collection) to the consistent hash ring.

DocumentClientHashPartitioningManager ( string>.Func partitionKeyExtractor, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, int initialPartitionCount, TransitionReadMode readMode = TransitionReadMode.ReadBoth ) : AngularAzureSearch.WebAPI.PartitionResolvers

Initializes a new instance of the DocumentClientHashPartitioningManager class.

RemovePartition ( ) : Task

Removes a partition (collection) from the consistent hash ring.

Приватные методы

Метод Описание
RepartitionData ( int newPartitionCount ) : Task

Internal method to rebalance data across a different number of partitions.

Описание методов

AddPartition() публичный Метод

Add a partition (collection) to the consistent hash ring.
public AddPartition ( ) : Task
Результат Task

DocumentClientHashPartitioningManager() публичный Метод

Initializes a new instance of the DocumentClientHashPartitioningManager class.
public DocumentClientHashPartitioningManager ( string>.Func partitionKeyExtractor, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, int initialPartitionCount, TransitionReadMode readMode = TransitionReadMode.ReadBoth ) : AngularAzureSearch.WebAPI.PartitionResolvers
partitionKeyExtractor string>.Func The partition key extractor function.
client Microsoft.Azure.Documents.Client.DocumentClient The DocumentDB client instance.
database Microsoft.Azure.Documents.Database The database to partition.
initialPartitionCount int The number of initial partitions to create.
readMode TransitionReadMode The mode to process requests in during data migrations.
Результат AngularAzureSearch.WebAPI.PartitionResolvers

RemovePartition() публичный Метод

Removes a partition (collection) from the consistent hash ring.
public RemovePartition ( ) : Task
Результат Task