RangePartitionResolver<T> Class
- java.
lang. Object - com.
microsoft. azure. documentdb. RangePartitionResolver<T>
- com.
Type Parameters
- T
Implements
public class RangePartitionResolver
implements PartitionResolver
RangePartitionResolver implements partitioning based on the ranges in the Azure Cosmos DB database service. It allows you to distribute requests and data across a number of partitions by implementing PartitionResolver interface.
Constructor Summary
Constructor | Description |
---|---|
RangePartitionResolver(PartitionKeyExtractor partitionKeyExtractor, Map<Range<T>,String> partitionMap) |
Range |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.lang.String |
resolveForCreate(Object document)
Resolves the collection for creating the document based on the partition key. |
java.lang.Iterable<java.lang.String> |
resolveForRead(Object partitionKey)
Resolves the collection for reading/querying the documents based on the partition key. |
Methods inherited from java.lang.Object
Constructor Details
RangePartitionResolver
public RangePartitionResolver(PartitionKeyExtractor partitionKeyExtractor, Map
RangePartitionResolver constructor taking in the PartitionKeyExtractor, a map of Ranges to collection links.
Parameters:
Method Details
resolveForCreate
public String resolveForCreate(Object document)
Resolves the collection for creating the document based on the partition key.
Parameters:
Returns:
resolveForRead
public Iterable
Resolves the collection for reading/querying the documents based on the partition key.
Parameters:
Returns:
Applies to
Azure SDK for Java