C# Класс AngularAzureSearch.WebAPI.PartitionResolvers.SpilloverPartitionResolver

Creates a PartitionResolver that automatically creates collections as they fill up. Default fillFactor is 90%. Prefix: "Collection."
Наследование: IPartitionResolver
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CreateCollectionIfRequired void
GetCollections List
ShouldCreateCollection bool

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

Метод Описание
GetPartitionKey ( object document ) : object

Returns the partition key for the document. Bypass by returning null.

ResolveForCreate ( object partitionKey ) : string

Returns the collection to create this document. Returns the last collection.

ResolveForRead ( object partitionKey ) : IEnumerable

Returns the collections to read for a document. Here we return all collections.

SpilloverPartitionResolver ( Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, DocumentCollectionSpec collectionSpec = null, string collectionIdPrefix = "Collection.", double fillFactor = 0.90, double checkIntervalSeconds = 3600 ) : System

Initializes a new instance of the SpilloverPartitionResolver class.

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

Метод Описание
CreateCollectionIfRequired ( ) : void
GetCollections ( Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, string collectionIdPrefix, DocumentCollectionSpec spec ) : List

Gets or creates the collections for the hash resolver.

ShouldCreateCollection ( ) : bool

Check if a spillover has to be scheduled.

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

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

Returns the partition key for the document. Bypass by returning null.
public GetPartitionKey ( object document ) : object
document object The document to locate.
Результат object

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

Returns the collection to create this document. Returns the last collection.
public ResolveForCreate ( object partitionKey ) : string
partitionKey object The partition key for the create.
Результат string

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

Returns the collections to read for a document. Here we return all collections.
public ResolveForRead ( object partitionKey ) : IEnumerable
partitionKey object The partition key for the read.
Результат IEnumerable

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

Initializes a new instance of the SpilloverPartitionResolver class.
public SpilloverPartitionResolver ( Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.Database database, DocumentCollectionSpec collectionSpec = null, string collectionIdPrefix = "Collection.", double fillFactor = 0.90, double checkIntervalSeconds = 3600 ) : System
client Microsoft.Azure.Documents.Client.DocumentClient The DocumentDB client instance.
database Microsoft.Azure.Documents.Database The database to use.
collectionSpec AngularAzureSearch.WebAPI.Helpers.DocumentCollectionSpec The specification/template to create collections from.
collectionIdPrefix string The prefix to use for collections.
fillFactor double The fill factor for spilling over collections.
checkIntervalSeconds double The interval between collection size checks.
Результат System