Class SiloAddress
Data class encapsulating the details of silo addresses.
Inheritance
Namespace: Orleans.Runtime
Assembly: Orleans.Core.Abstractions.dll
Syntax
public class SiloAddress : IEquatable<SiloAddress>, IComparable<SiloAddress>, IComparable
Properties
| Improve this Doc View SourceEndpoint
Declaration
public IPEndPoint Endpoint { get; }
Property Value
Type | Description |
---|---|
IPEndPoint |
Generation
Declaration
public int Generation { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsClient
Declaration
public bool IsClient { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Zero
Special constant value to indicate an empty SiloAddress.
Declaration
public static SiloAddress Zero { get; }
Property Value
Type | Description |
---|---|
SiloAddress |
Methods
| Improve this Doc View SourceAllocateNewGeneration()
Allocate a new silo generation number.
Declaration
public static int AllocateNewGeneration()
Returns
Type | Description |
---|---|
System.Int32 | A new silo generation number. |
CompareTo(SiloAddress)
Declaration
public int CompareTo(SiloAddress other)
Parameters
Type | Name | Description |
---|---|---|
SiloAddress | other |
Returns
Type | Description |
---|---|
System.Int32 |
CompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Int32 |
Equals(SiloAddress)
IEquatable.Equals method override.
Declaration
public bool Equals(SiloAddress other)
Parameters
Type | Name | Description |
---|---|---|
SiloAddress | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Object.Equals method override.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
FromParsableString(String)
Create a new SiloAddress object by parsing string in a standard form returned from ToParsableString
method.
Declaration
public static SiloAddress FromParsableString(string addr)
Parameters
Type | Name | Description |
---|---|---|
System.String | addr | String containing the SiloAddress info to be parsed. |
Returns
Type | Description |
---|---|
SiloAddress | New SiloAddress object created from the input data. |
GetConsistentHashCode()
Get a consistent hash value for this silo address.
Declaration
public int GetConsistentHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Consistent hash value for this silo address. |
GetHashCode()
Object.GetHashCode method override.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
GetUniformHashCodes(Int32)
Declaration
public List<uint> GetUniformHashCodes(int numHashes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numHashes |
Returns
Type | Description |
---|---|
List<System.UInt32> |
New(IPEndPoint, Int32)
Factory for creating new SiloAddresses with specified IP endpoint address and silo generation number.
Declaration
public static SiloAddress New(IPEndPoint ep, int gen)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | ep | IP endpoint address of the silo. |
System.Int32 | gen | Generation number of the silo. |
Returns
Type | Description |
---|---|
SiloAddress | SiloAddress object initialized with specified address and silo generation. |
ToLongString()
Return a long string representation of this SiloAddress.
Declaration
public string ToLongString()
Returns
Type | Description |
---|---|
System.String | String representaiton of this SiloAddress. |
Remarks
Note: This string value is not comparable with the FromParsableString
method -- use the ToParsableString
method for that purpose.
ToParsableString()
Return this SiloAddress in a standard string form, suitable for later use with the FromParsableString
method.
Declaration
public string ToParsableString()
Returns
Type | Description |
---|---|
System.String | SiloAddress in a standard string format. |
ToString()
Object.ToString method override.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
ToStringWithHashCode()
Return a long string representation of this SiloAddress, including it's consistent hash value.
Declaration
public string ToStringWithHashCode()
Returns
Type | Description |
---|---|
System.String | String representaiton of this SiloAddress. |
Remarks
Note: This string value is not comparable with the FromParsableString
method -- use the ToParsableString
method for that purpose.