HashPartitionResolver Class
HashPartitionResolver implements partitioning based on the value of a hash function, allowing you to evenly distribute requests and data across a number of partitions.
- Inheritance
-
builtins.objectHashPartitionResolver
Constructor
HashPartitionResolver(partition_key_extractor, collection_links, default_number_of_virtual_nodes_per_collection=128, hash_generator=None)
Parameters
- partition_key_extractor
- collection_links
- default_number_of_virtual_nodes_per_collection
default value: 128
- hash_generator
default value: None
Methods
| ResolveForCreate |
Resolves the collection for creating the document based on the partition key. |
| ResolveForRead |
Resolves the collection for reading/querying the documents based on the partition key. |
ResolveForCreate
Resolves the collection for creating the document based on the partition key.
ResolveForCreate(document)
Parameters
Returns
Collection Self link or Name based link which should handle the Create operation.
Return type
ResolveForRead
Feedback
Submit and view feedback for