C# 클래스 AngularAzureSearch.WebAPI.PartitionResolvers.TransitionHashPartitionResolver

Creates a partition resolver that handles routing of reads and creates during transitions between partitioning configurations. Most commonly when you add an additional collection to the hash ring. This also shows how you can manage the policy for handling reads during migration (read both old and new partitions, or throw a retry-able error, etc.)
상속: IPartitionResolver
파일 보기 프로젝트 열기: TheDarkCode/AngularAzureSearch 1 사용 예제들

공개 메소드들

메소드 설명
GetPartitionKey ( object document ) : object

Returns the partition key for the document.

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 partitionKey, based on the TransitionReadMode.

TransitionHashPartitionResolver ( IPartitionResolver current, IPartitionResolver next, TransitionReadMode readMode = TransitionReadMode.ReadBoth ) : System

Initializes a new instance of the TransitionHashPartitionResolver class.

메소드 상세

GetPartitionKey() 공개 메소드

Returns the partition key for the document.
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 partitionKey, based on the TransitionReadMode.
public ResolveForRead ( object partitionKey ) : IEnumerable
partitionKey object The partition key for the read.
리턴 IEnumerable

TransitionHashPartitionResolver() 공개 메소드

Initializes a new instance of the TransitionHashPartitionResolver class.
public TransitionHashPartitionResolver ( IPartitionResolver current, IPartitionResolver next, TransitionReadMode readMode = TransitionReadMode.ReadBoth ) : System
current IPartitionResolver The current IPartitionResolver.
next IPartitionResolver The next IPartitionResolver.
readMode TransitionReadMode How to handle read requests during transition.
리턴 System