Package akka.cluster

Class MembershipState

  • All Implemented Interfaces:
    java.io.Serializable, scala.Equals, scala.Product, scala.Serializable

    public final class MembershipState
    extends java.lang.Object
    implements scala.Product, scala.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • MembershipState

        public MembershipState​(Gossip latestGossip,
                               UniqueAddress selfUniqueAddress,
                               java.lang.String selfDc,
                               int crossDcConnections)
    • Method Detail

      • convergenceSkipUnreachableWithMemberStatus

        public static scala.collection.immutable.Set<MemberStatus> convergenceSkipUnreachableWithMemberStatus()
      • removeUnreachableWithMemberStatus

        public static scala.collection.immutable.Set<MemberStatus> removeUnreachableWithMemberStatus()
      • apply

        public static MembershipState apply​(Gossip latestGossip,
                                            UniqueAddress selfUniqueAddress,
                                            java.lang.String selfDc,
                                            int crossDcConnections)
        INTERNAL API
        Parameters:
        latestGossip - (undocumented)
        selfUniqueAddress - (undocumented)
        selfDc - (undocumented)
        crossDcConnections - (undocumented)
        Returns:
        (undocumented)
      • latestGossip

        public Gossip latestGossip()
      • selfDc

        public java.lang.String selfDc()
      • crossDcConnections

        public int crossDcConnections()
      • selfMember

        public Member selfMember()
      • members

        public scala.collection.immutable.SortedSet<Member> members()
      • convergence

        public boolean convergence​(scala.collection.immutable.Set<UniqueAddress> exitingConfirmed)
        Checks if we have a cluster convergence. If there are any in data center node pairs that cannot reach each other then we can't have a convergence until those nodes reach each other again or one of them is downed

        Parameters:
        exitingConfirmed - (undocumented)
        Returns:
        true if convergence have been reached and false if not
      • dcReachabilityWithoutObservationsWithin

        public Reachability dcReachabilityWithoutObservationsWithin()
      • dcReachabilityExcludingDownedObservers

        public Reachability dcReachabilityExcludingDownedObservers()
      • dcReachabilityNoOutsideNodes

        public Reachability dcReachabilityNoOutsideNodes()
      • ageSortedTopOldestMembersPerDc

        public scala.collection.immutable.Map<java.lang.String,​scala.collection.SortedSet<Member>> ageSortedTopOldestMembersPerDc()
      • isReachableExcludingDownedObservers

        public boolean isReachableExcludingDownedObservers​(UniqueAddress toAddress)
        Parameters:
        toAddress - (undocumented)
        Returns:
        true if toAddress should be reachable from the fromDc in general, within a data center this means only caring about data center local observations, across data centers it means caring about all observations for the toAddress.
      • dcMembers

        public scala.collection.SortedSet<Member> dcMembers()
      • roleLeader

        public scala.Option<UniqueAddress> roleLeader​(java.lang.String role)
      • leaderOf

        public scala.Option<UniqueAddress> leaderOf​(scala.collection.immutable.SortedSet<Member> mbrs)
      • validNodeForGossip

        public boolean validNodeForGossip​(UniqueAddress node)
        Never gossip to self and not to node marked as unreachable by self (heartbeat messages are not getting through so no point in trying to gossip). Nodes marked as unreachable by others are still valid targets for gossip.
        Parameters:
        node - (undocumented)
        Returns:
        (undocumented)
      • youngestMember

        public Member youngestMember()
      • gossipTargetsForExitingMembers

        public scala.collection.immutable.Set<Member> gossipTargetsForExitingMembers​(scala.collection.immutable.Set<Member> exitingMembers)
        The Exiting change is gossiped to the two oldest nodes for quick dissemination to potential Singleton nodes
        Parameters:
        exitingMembers - (undocumented)
        Returns:
        (undocumented)
      • copy$default$1

        public Gossip copy$default$1()
      • copy$default$3

        public java.lang.String copy$default$3()
      • copy$default$4

        public int copy$default$4()
      • productPrefix

        public java.lang.String productPrefix()
        Specified by:
        productPrefix in interface scala.Product
      • productArity

        public int productArity()
        Specified by:
        productArity in interface scala.Product
      • productElement

        public java.lang.Object productElement​(int x$1)
        Specified by:
        productElement in interface scala.Product
      • productIterator

        public scala.collection.Iterator<java.lang.Object> productIterator()
        Specified by:
        productIterator in interface scala.Product
      • canEqual

        public boolean canEqual​(java.lang.Object x$1)
        Specified by:
        canEqual in interface scala.Equals
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object x$1)
        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.Object