Package akka.cluster

Class MembershipState

  • All Implemented Interfaces:, scala.Equals, scala.Product

    public final class MembershipState
    extends java.lang.Object
    implements scala.Product,
    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()
      • allowedToPrepareToShutdown

        public static scala.collection.immutable.Set<MemberStatus> allowedToPrepareToShutdown()
      • prepareForShutdownStates

        public static scala.collection.immutable.Set<MemberStatus> prepareForShutdownStates()
      • 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

        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.immutable.SortedSet<Member>> ageSortedTopOldestMembersPerDc()
      • isReachableExcludingDownedObservers

        public boolean isReachableExcludingDownedObservers​(UniqueAddress toAddress)
        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.
      • 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
      • 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
      • productElementName

        public java.lang.String productElementName​(int x$1)
        Specified by:
        productElementName in interface scala.Product
      • hashCode

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

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

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