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. |
startExclusive | The start of the range (exclusive). |
System. |
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. |
StartExclusive
Gets the exclusive start of the hash range.
Declaration
public uint StartExclusive { get; }
Property Value
Type | Description |
---|---|
System. |
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. |
hash | The hash to check. |
Returns
Type | Description |
---|---|
System. |
True if the hash is in the range and false otherwise. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
Overrides
System.ValueType.ToString()