C# 클래스 AngularAzureSearch.WebAPI.Initializers.PartitionInitializers

Partition Initializers contains a collection of methods to initialize different partition resolvers to use such things as hash partitioning, lookup partitioning, and range partitioning.
파일 보기 프로젝트 열기: TheDarkCode/AngularAzureSearch

공개 프로퍼티들

프로퍼티 타입 설명
defaultOfferType string

공개 메소드들

메소드 설명
InitializeCustomHashResolver ( string>.Func partitionKeyExtractor, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, string collectionNames ) : Task

Initialize a HashPartitionResolver that uses a custom function to extract the partition key.

InitializeHashResolver ( string partitionKeyPropertyName, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, string collectionNames ) : Task

Initialize a HashPartitionResolver.

InitializeLookupPartitionResolver ( string partitionKeyPropertyName, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, string collectionNames ) : Task>

Initialize a LookupPartitionResolver. Default is for US East/West to go to first collection name, Europe to second, and AsiaPacific / Other to third.

InitializeManagedHashResolver ( string>.Func partitionKeyExtractor, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, int numCollections, DocumentCollectionSpec collectionSpec ) : ManagedHashPartitionResolver

Initialize a "managed" HashPartitionResolver that also takes care of creating collections, and cloning collection properties like stored procedures, offer type and indexing policy.

InitializeRangeResolver ( string partitionKeyPropertyName, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, string collectionNames ) : Task>

Initialize a RangePartitionResolver.

메소드 상세

InitializeCustomHashResolver() 공개 정적인 메소드

Initialize a HashPartitionResolver that uses a custom function to extract the partition key.
public static InitializeCustomHashResolver ( string>.Func partitionKeyExtractor, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, string collectionNames ) : Task
partitionKeyExtractor string>.Func The partition key extractor function.
client Microsoft.Azure.Documents.Client.DocumentClient The DocumentDB client instance to use.
database Microsoft.Azure.Documents.Database The database to run the samples on.
collectionNames string The names of collections used.
리턴 Task

InitializeHashResolver() 공개 정적인 메소드

Initialize a HashPartitionResolver.
public static InitializeHashResolver ( string partitionKeyPropertyName, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, string collectionNames ) : Task
partitionKeyPropertyName string The property name to be used as the partition Key.
client Microsoft.Azure.Documents.Client.DocumentClient The DocumentDB client instance to use.
database Microsoft.Azure.Documents.Database The database to run the samples on.
collectionNames string The names of collections used.
리턴 Task

InitializeLookupPartitionResolver() 공개 정적인 메소드

Initialize a LookupPartitionResolver. Default is for US East/West to go to first collection name, Europe to second, and AsiaPacific / Other to third.
public static InitializeLookupPartitionResolver ( string partitionKeyPropertyName, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, string collectionNames ) : Task>
partitionKeyPropertyName string The property name to be used as the partition Key.
client Microsoft.Azure.Documents.Client.DocumentClient The DocumentDB client instance to use.
database Microsoft.Azure.Documents.Database The database to run the samples on.
collectionNames string The names of collections used.
리턴 Task>

InitializeManagedHashResolver() 공개 정적인 메소드

Initialize a "managed" HashPartitionResolver that also takes care of creating collections, and cloning collection properties like stored procedures, offer type and indexing policy.
public static InitializeManagedHashResolver ( string>.Func partitionKeyExtractor, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, int numCollections, DocumentCollectionSpec collectionSpec ) : ManagedHashPartitionResolver
partitionKeyExtractor string>.Func The partition key extractor function. (Ex: "u => ((UserProfile)u).UserId")
client Microsoft.Azure.Documents.Client.DocumentClient The DocumentDB client instance to use.
database Microsoft.Azure.Documents.Database The database to run the samples on.
numCollections int The number of collections to be used.
collectionSpec AngularAzureSearch.WebAPI.Helpers.DocumentCollectionSpec The DocumentCollectionSpec to be used for each collection created. If null returns Spec with defaultOfferType as set in config.
리턴 AngularAzureSearch.WebAPI.PartitionResolvers.ManagedHashPartitionResolver

InitializeRangeResolver() 공개 정적인 메소드

Initialize a RangePartitionResolver.
public static InitializeRangeResolver ( string partitionKeyPropertyName, Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, string collectionNames ) : Task>
partitionKeyPropertyName string The property name to be used as the partition Key.
client Microsoft.Azure.Documents.Client.DocumentClient The DocumentDB client instance to use.
database Microsoft.Azure.Documents.Database The database to run the samples on.
collectionNames string The names of collections used.
리턴 Task>

프로퍼티 상세

defaultOfferType 공개적으로 정적으로 프로퍼티

The defaultOfferType is set in the config file, ie: S1, S2, S3. Will be used if no DocumentCollectionSpec is included for ManagedHashResolver.
public static string defaultOfferType
리턴 string