Skip to content

SiloAddress Methods

Data class encapsulating the details of silo addresses.

CompareTo(SiloAddress?)

View source
public int CompareTo(SiloAddress? other)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Parameters

otherSiloAddress?
An object to compare with this instance.

Returns

A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Equals(SiloAddress?)

View source
public bool Equals(SiloAddress? other)
Indicates whether the current object is equal to another object of the same type.

Parameters

otherSiloAddress?
An object to compare with this object.

Returns

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

override
View source
public override bool Equals(object? obj)
Determines whether the specified object is equal to the current object.

Parameters

objobject?
The object to compare with the current object.

Returns

true if the specified object is equal to the current object; otherwise, false.

FromParsableString(string)

static
View source
public static SiloAddress FromParsableString(string addr)
Create a new SiloAddress object by parsing string in a standard form returned from ToParsableString method.

Parameters

addrstring
String containing the SiloAddress info to be parsed.

Returns

New SiloAddress object created from the input data.

FromUtf8String(ReadOnlySpan<byte>)

static
View source
public static SiloAddress FromUtf8String(ReadOnlySpan<byte> addr)
Create a new SiloAddress object by parsing string in a standard form returned from ToParsableString method.

Parameters

addrReadOnlySpan<byte>
String containing the SiloAddress info to be parsed.

Returns

New SiloAddress object created from the input data.

GetConsistentHashCode

View source
public int GetConsistentHashCode()
Returns a consistent hash value for this silo address.

Returns

Consistent hash value for this silo address.

GetHashCode

override
View source
public override int GetHashCode()
Serves as the default hash function.

Returns

A hash code for the current object.

GetUniformHashCodes(int)

View source
public uint[] GetUniformHashCodes(int numHashes)
Returns a collection of uniform hash codes variants for this instance.

Parameters

numHashesint
The number of hash codes to return.

Returns

A collection of uniform hash codes variants for this instance.

IsPredecessorOf(SiloAddress)

View source
public bool IsPredecessorOf(SiloAddress other)
Returns true if the provided value represents the same logical server as this value and is a predecessor to this server, otherwise false.

Parameters

otherSiloAddress
The other instance.

Returns

true if the provided value represents the same logical server as this value and is a predecessor to this server, otherwise false.

IsSuccessorOf(SiloAddress)

View source
public bool IsSuccessorOf(SiloAddress other)
Returns true if the provided value represents the same logical server as this value and is a successor to this server, otherwise false.

Parameters

otherSiloAddress
The other instance.

Returns

true if the provided value represents the same logical server as this value and is a successor to this server, otherwise false.

New(IPAddress, int, int)

static
View source
public static SiloAddress New(IPAddress address, int port, int generation)
Factory for creating new SiloAddresses with specified IP endpoint address and silo generation number.

Parameters

addressIPAddress
IP address of the silo.
portint
Port number
generationint
Generation number of the silo.

Returns

SiloAddress object initialized with specified address and silo generation.

New(IPEndPoint, int)

static
View source
public static SiloAddress New(IPEndPoint ep, int gen)
Factory for creating new SiloAddresses with specified IP endpoint address and silo generation number.

Parameters

epIPEndPoint
IP endpoint address of the silo.
genint
Generation number of the silo.

Returns

SiloAddress object initialized with specified address and silo generation.

Parse(ReadOnlySpan<byte>, IFormatProvider?)

static
View source
public static SiloAddress Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider = null)
Parses a SiloAddress from UTF-8 text in the standard form returned from SiloAddress.

Parameters

utf8TextReadOnlySpan<byte>
UTF-8 text containing the SiloAddress info to be parsed.
providerIFormatProvider?
An object that provides culture-specific formatting information. This parameter is ignored.

Returns

A SiloAddress parsed from the input data.

Parse(string, IFormatProvider?)

static
View source
public static SiloAddress Parse(string value, IFormatProvider? provider = null)
Parses a SiloAddress from a string in the standard form returned from SiloAddress.

Parameters

valuestring
String containing the SiloAddress info to be parsed.
providerIFormatProvider?
An object that provides culture-specific formatting information. This parameter is ignored.

Returns

A SiloAddress parsed from the input data.

ToParsableString

View source
public string ToParsableString()
Return this SiloAddress in a standard string form, suitable for later use with the FromParsableString method.

Returns

SiloAddress in a standard string format.

ToString

override
View source
public override string ToString()
Return a long string representation of this SiloAddress.

Returns

String representation of this SiloAddress.

ToStringWithHashCode

View source
public string ToStringWithHashCode()
Return a long string representation of this SiloAddress, including it's consistent hash value.

Returns

String representation of this SiloAddress.

TryParse(ReadOnlySpan<byte>, IFormatProvider?, SiloAddress?)

static
View source
public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out SiloAddress? result)
Tries to parse a SiloAddress from UTF-8 text in the standard form returned from SiloAddress.

Parameters

utf8TextReadOnlySpan<byte>
UTF-8 text containing the SiloAddress info to be parsed.
providerIFormatProvider?
An object that provides culture-specific formatting information. This parameter is ignored.
resultSiloAddress?
The parsed SiloAddress, or null if parsing failed.

Returns

true if parsing succeeded; otherwise, false.

TryParse(string?, IFormatProvider?, SiloAddress?)

static
View source
public static bool TryParse(string? value, IFormatProvider? provider, out SiloAddress? result)
Tries to parse a SiloAddress from a string in the standard form returned from SiloAddress.

Parameters

valuestring?
String containing the SiloAddress info to be parsed.
providerIFormatProvider?
An object that provides culture-specific formatting information. This parameter is ignored.
resultSiloAddress?
The parsed SiloAddress, or null if parsing failed.

Returns

true if parsing succeeded; otherwise, false.