Class Member
Represents the address, current status, and roles of a cluster member node.
Inherited Members
Namespace: Akka.Cluster
Assembly: Akka.Cluster.dll
Syntax
public class Member : IComparable<Member>, IComparableRemarks
NOTE: GetHashCode() and Equals(object) are solely based on the underlying Address, not its MemberStatus and roles.
Fields
| Edit this page View SourceAddressOrdering
Address ordering type class, sorts addresses by host and port.
Declaration
public static readonly IComparer<Address> AddressOrderingField Value
| Type | Description | 
|---|---|
| IComparer<Address> | 
AgeOrdering
Compares members by their upNumber to determine which is oldest / youngest.
Declaration
public static readonly IComparer<Member> AgeOrderingField Value
| Type | Description | 
|---|---|
| IComparer<Member> | 
Properties
| Edit this page View SourceAddress
The Address for this member.
Declaration
public Address Address { get; }Property Value
| Type | Description | 
|---|---|
| Address | 
AppVersion
Application version
Declaration
public AppVersion AppVersion { get; }Property Value
| Type | Description | 
|---|---|
| AppVersion | 
Roles
The set of roles for the current member. Can be empty.
Declaration
public ImmutableHashSet<string> Roles { get; }Property Value
| Type | Description | 
|---|---|
| ImmutableHashSet<string> | 
Status
The status of the current member.
Declaration
public MemberStatus Status { get; }Property Value
| Type | Description | 
|---|---|
| MemberStatus | 
UniqueAddress
TBD
Declaration
public UniqueAddress UniqueAddress { get; }Property Value
| Type | Description | 
|---|---|
| UniqueAddress | 
Methods
| Edit this page View SourceCompareTo(Member)
Declaration
public int CompareTo(Member other)Parameters
| Type | Name | Description | 
|---|---|---|
| Member | other | 
Returns
| Type | Description | 
|---|---|
| int | 
Copy(MemberStatus)
Creates a copy of this member with the status provided.
Declaration
public Member Copy(MemberStatus status)Parameters
| Type | Name | Description | 
|---|---|---|
| MemberStatus | status | The new status of this member. | 
Returns
| Type | Description | 
|---|---|
| Member | A new copy of this member with the provided status. | 
Exceptions
| Type | Condition | 
|---|---|
| InvalidOperationException | TBD | 
CopyUp(int)
Creates a copy of this member with the provided upNumber.
Declaration
public Member CopyUp(int upNumber)Parameters
| Type | Name | Description | 
|---|---|---|
| int | upNumber | The new upNumber for this member. | 
Returns
| Type | Description | 
|---|---|
| Member | A new copy of this member with the provided upNumber. | 
Equals(object)
Declaration
public override bool Equals(object obj)Parameters
| Type | Name | Description | 
|---|---|---|
| object | obj | 
Returns
| Type | Description | 
|---|---|
| bool | 
Overrides
| Edit this page View SourceGetHashCode()
Declaration
public override int GetHashCode()Returns
| Type | Description | 
|---|---|
| int | 
Overrides
| Edit this page View SourceHasRole(string)
Checks to see if a member supports a particular role.
Declaration
public bool HasRole(string role)Parameters
| Type | Name | Description | 
|---|---|---|
| string | role | The rolename to check. | 
Returns
| Type | Description | 
|---|---|
| bool | 
 | 
HighestPriorityOf(Member, Member)
Picks the Member with the highest "priority" MemberStatus.
Declaration
public static Member HighestPriorityOf(Member m1, Member m2)Parameters
| Type | Name | Description | 
|---|---|---|
| Member | m1 | The first member to compare. | 
| Member | m2 | The second member to compare. | 
Returns
| Type | Description | 
|---|---|
| Member | The higher priority of the two members. | 
IsOlderThan(Member)
Is this member older, has been part of cluster longer, than another member. It is only correct when comparing two existing members in a cluster. A member that joined after removal of another member may be considered older than the removed member.
Declaration
public bool IsOlderThan(Member other)Parameters
| Type | Name | Description | 
|---|---|---|
| Member | other | The other member to check. | 
Returns
| Type | Description | 
|---|---|
| bool | 
 | 
PickHighestPriority(IEnumerable<Member>, IEnumerable<Member>)
Combines and sorts two lists of Member into a single list ordered by highest prioirity
Declaration
public static ImmutableHashSet<Member> PickHighestPriority(IEnumerable<Member> a, IEnumerable<Member> b)Parameters
| Type | Name | Description | 
|---|---|---|
| IEnumerable<Member> | a | The first collection of members. | 
| IEnumerable<Member> | b | The second collection of members. | 
Returns
| Type | Description | 
|---|---|
| ImmutableHashSet<Member> | An immutable hash set containing the members with the highest priority. | 
PickNextTransition(Member, Member)
Compares two copies OF THE SAME MEMBER and returns whichever one is a valid transition of the other.
Declaration
public static Member PickNextTransition(Member a, Member b)Parameters
| Type | Name | Description | 
|---|---|---|
| Member | a | First member instance. | 
| Member | b | Second member instance. | 
Returns
| Type | Description | 
|---|---|
| Member | If a and b are different members, this method will return  | 
PickNextTransition(IEnumerable<Member>, IEnumerable<Member>)
Combines and sorts two lists of Member into a single list ordered by Member's valid transitions
Declaration
public static ImmutableSortedSet<Member> PickNextTransition(IEnumerable<Member> a, IEnumerable<Member> b)Parameters
| Type | Name | Description | 
|---|---|---|
| IEnumerable<Member> | a | The first collection of members. | 
| IEnumerable<Member> | b | The second collection of members. | 
Returns
| Type | Description | 
|---|---|
| ImmutableSortedSet<Member> | An immutable hash set containing the members with the next logical transition. | 
ToString()
Declaration
public override string ToString()Returns
| Type | Description | 
|---|---|
| string | 
 Edit this page
Edit this page