C# Class 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.
Mostra file Open project: TheDarkCode/AngularAzureSearch

Public Methods

Method Description
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.

Private Methods

Method Description
RepartitionData ( int newPartitionCount ) : Task

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

Method Details

AddPartition() public method

Add a partition (collection) to the consistent hash ring.
public AddPartition ( ) : Task
return Task

DocumentClientHashPartitioningManager() public method

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.
return AngularAzureSearch.WebAPI.PartitionResolvers

RemovePartition() public method

Removes a partition (collection) from the consistent hash ring.
public RemovePartition ( ) : Task
return Task