Struct HashRange
Represents a range of hashes in the consistent hash ring.
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: ConsistentHashing
Assembly: ConsistentHashing.dll
Syntax
public struct HashRange
Constructors
| Improve this Doc View SourceHashRange(UInt32, UInt32)
Creates a hash range for (startExclusive, endInclusive].
Declaration
public HashRange(uint startExclusive, uint endInclusive)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | startExclusive | The start of the range (exclusive). |
System.UInt32 | endInclusive | The end of the range (inclusive). |
Properties
| Improve this Doc View SourceEndInclusive
Gets the inclusive end of the hash range.
Declaration
public uint EndInclusive { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
StartExclusive
Gets the exclusive start of the hash range.
Declaration
public uint StartExclusive { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceContains(UInt32)
Checks whether the specified hash is contained in the range.
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 in the range and false otherwise. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.ValueType.ToString()