C# Class AngularAzureSearch.WebAPI.PartitionResolvers.ManagedHashPartitionResolver

Implement a "managed" hash partition resolver that creates collections as needed.
Inheritance: HashPartitionResolver
Datei anzeigen Open project: TheDarkCode/AngularAzureSearch Class Usage Examples

Public Methods

Method Description
ManagedHashPartitionResolver ( string>.Func partitionKeyExtractor, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, int numberOfCollections, IHashGenerator hashGenerator = null, DocumentCollectionSpec collectionSpec = null, string collectionIdPrefix = "ManagedHashCollection." ) : System

Initializes a new instance of the ManagedHashPartitionResolver class.

Private Methods

Method Description
GetCollections ( Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, int numberOfCollections, string collectionIdPrefix, DocumentCollectionSpec spec ) : List

Gets or creates the collections for the hash resolver.

Method Details

ManagedHashPartitionResolver() public method

Initializes a new instance of the ManagedHashPartitionResolver class.
public ManagedHashPartitionResolver ( string>.Func partitionKeyExtractor, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, int numberOfCollections, IHashGenerator hashGenerator = null, DocumentCollectionSpec collectionSpec = null, string collectionIdPrefix = "ManagedHashCollection." ) : System
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 use.
numberOfCollections int the number of collections.
hashGenerator IHashGenerator the hash generator.
collectionSpec AngularAzureSearch.WebAPI.Helpers.DocumentCollectionSpec the specification/template to create collections from.
collectionIdPrefix string the prefix to use for collections.
return System