• Articles
  • API Documentation
  • ConsistentHashing
  • HashRangeCollection
Show / Hide Table of Contents
  • ConsistentHashing
    • HashRange
    • HashRangeCollection
    • HashRing<TNode>
    • HashRingExtensions
    • IConsistentHashRing<TNode>
    • Partition<TNode>

Class HashRangeCollection

Represents a collection of non-overlapping hash ranges.

Inheritance
System.Object
HashRangeCollection
Implements
System.Collections.Generic.IEnumerable<HashRange>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ConsistentHashing
Assembly: ConsistentHashing.dll
Syntax
public class HashRangeCollection : IEnumerable<HashRange>, IEnumerable

Constructors

| Improve this Doc View Source

HashRangeCollection(IEnumerable<HashRange>)

Create a collection of hash ranges. The ranges must be non-overlapping.

Declaration
public HashRangeCollection(IEnumerable<HashRange> ranges)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<HashRange> ranges

The hash ranges.

Methods

| Improve this Doc View Source

Contains(UInt32)

Checks whether the specified hash falls within any range in the collection.

Declaration
public bool Contains(uint hash)
Parameters
Type Name Description
System.UInt32 hash

The hash to check.

Returns
Type Description
System.Boolean

True if the hash is within a range in the collection and false otherwise.

| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates over all the HashRanges in the collection.

Declaration
public IEnumerator<HashRange> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<HashRange>

The enumerator.

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • HashRangeCollection(IEnumerable<HashRange>)
  • Methods
    • Contains(UInt32)
    • GetEnumerator()
  • Explicit Interface Implementations
    • IEnumerable.GetEnumerator()
  • Implements
Back to top Generated by DocFX