HashPartitionResolver Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
HashPartitionResolver(Func<Object,String>, IEnumerable<String>, Int32, IHashGenerator) |
Initializes a new instance of the HashPartitionResolver in the Azure Cosmos DB service using the specified |
HashPartitionResolver(String, IEnumerable<String>, Int32, IHashGenerator) |
Initializes a new instance of the HashPartitionResolver in the Azure Cosmos DB service using the specified |
HashPartitionResolver(Func<Object,String>, IEnumerable<String>, Int32, IHashGenerator)
Initializes a new instance of the HashPartitionResolver in the Azure Cosmos DB service using the specified partitionKeyExtractor
value.
public HashPartitionResolver (Func<object,string> partitionKeyExtractor, System.Collections.Generic.IEnumerable<string> collectionLinks, int numberOfVirtualNodesPerCollection = 128, Microsoft.Azure.Documents.Partitioning.IHashGenerator hashGenerator = default);
new Microsoft.Azure.Documents.Partitioning.HashPartitionResolver : Func<obj, string> * seq<string> * int * Microsoft.Azure.Documents.Partitioning.IHashGenerator -> Microsoft.Azure.Documents.Partitioning.HashPartitionResolver
Public Sub New (partitionKeyExtractor As Func(Of Object, String), collectionLinks As IEnumerable(Of String), Optional numberOfVirtualNodesPerCollection As Integer = 128, Optional hashGenerator As IHashGenerator = Nothing)
Parameters
- collectionLinks
- IEnumerable<String>
The list of collection links used for hashing.
- numberOfVirtualNodesPerCollection
- Int32
The number of virtual nodes per collection in the conisistent hash ring.
- hashGenerator
- IHashGenerator
The IHashGenerator to use in consistent hashing. If null, the default MD5 hash generator is used.
Applies to
HashPartitionResolver(String, IEnumerable<String>, Int32, IHashGenerator)
Initializes a new instance of the HashPartitionResolver in the Azure Cosmos DB service using the specified partitionKeyPropertyName
value.
public HashPartitionResolver (string partitionKeyPropertyName, System.Collections.Generic.IEnumerable<string> collectionLinks, int numberOfVirtualNodesPerCollection = 128, Microsoft.Azure.Documents.Partitioning.IHashGenerator hashGenerator = default);
new Microsoft.Azure.Documents.Partitioning.HashPartitionResolver : string * seq<string> * int * Microsoft.Azure.Documents.Partitioning.IHashGenerator -> Microsoft.Azure.Documents.Partitioning.HashPartitionResolver
Public Sub New (partitionKeyPropertyName As String, collectionLinks As IEnumerable(Of String), Optional numberOfVirtualNodesPerCollection As Integer = 128, Optional hashGenerator As IHashGenerator = Nothing)
Parameters
- partitionKeyPropertyName
- String
The name of the property in the document to execute the hashing on.
- collectionLinks
- IEnumerable<String>
The list of collection links used for hashing.
- numberOfVirtualNodesPerCollection
- Int32
The number of virtual nodes per collection in the conisistent hash ring.
- hashGenerator
- IHashGenerator
The IHashGenerator to use in consistent hashing. If null, the default MD5 hash generator is used.
Remarks
Use when you want to partition based on a single property name. For other partitioning schemes, use the constructor with partitionKeyExtractor instead.