Search Results for

    Show / Hide Table of Contents

    Class Member

    Represents the address, current status, and roles of a cluster member node.

    Inheritance
    object
    Member
    Implements
    IComparable<Member>
    IComparable
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Akka.Cluster
    Assembly: Akka.Cluster.dll
    Syntax
    public class Member : IComparable<Member>, IComparable
    Remarks

    NOTE: GetHashCode() and Equals(object) are solely based on the underlying Address, not its MemberStatus and roles.

    Fields

    | Edit this page View Source

    AddressOrdering

    Address ordering type class, sorts addresses by host and port.

    Declaration
    public static readonly IComparer<Address> AddressOrdering
    Field Value
    Type Description
    IComparer<Address>
    | Edit this page View Source

    AgeOrdering

    Compares members by their upNumber to determine which is oldest / youngest.

    Declaration
    public static readonly IComparer<Member> AgeOrdering
    Field Value
    Type Description
    IComparer<Member>

    Properties

    | Edit this page View Source

    Address

    The Address for this member.

    Declaration
    public Address Address { get; }
    Property Value
    Type Description
    Address
    | Edit this page View Source

    AppVersion

    Application version

    Declaration
    public AppVersion AppVersion { get; }
    Property Value
    Type Description
    AppVersion
    | Edit this page View Source

    Roles

    The set of roles for the current member. Can be empty.

    Declaration
    public ImmutableHashSet<string> Roles { get; }
    Property Value
    Type Description
    ImmutableHashSet<string>
    | Edit this page View Source

    Status

    The status of the current member.

    Declaration
    public MemberStatus Status { get; }
    Property Value
    Type Description
    MemberStatus
    | Edit this page View Source

    UniqueAddress

    TBD

    Declaration
    public UniqueAddress UniqueAddress { get; }
    Property Value
    Type Description
    UniqueAddress

    Methods

    | Edit this page View Source

    CompareTo(Member)

    Declaration
    public int CompareTo(Member other)
    Parameters
    Type Name Description
    Member other
    Returns
    Type Description
    int
    | Edit this page View Source

    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

    | Edit this page View Source

    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.

    | Edit this page View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page View Source

    HasRole(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

    true if this member supports the role. false otherwise.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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

    true if this member is older than the other member. false otherwise.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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 null. Otherwise, will return a or b depending on which one is a valid transition of the other. If neither are a valid transition, we return null

    | Edit this page View Source

    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.

    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IComparable<T>
    IComparable

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET