Package akka.cluster

Class ClusterEvent.CurrentClusterState

  • All Implemented Interfaces:
    java.io.Serializable, scala.Equals, scala.Product, scala.Product5<scala.collection.immutable.SortedSet<Member>,​scala.collection.immutable.Set<Member>,​scala.collection.immutable.Set<Address>,​scala.Option<Address>,​scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>>>
    Enclosing class:
    ClusterEvent

    public static final class ClusterEvent.CurrentClusterState
    extends java.lang.Object
    implements scala.Product5<scala.collection.immutable.SortedSet<Member>,​scala.collection.immutable.Set<Member>,​scala.collection.immutable.Set<Address>,​scala.Option<Address>,​scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>>>, java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CurrentClusterState​(scala.collection.immutable.SortedSet<Member> members, scala.collection.immutable.Set<Member> unreachable, scala.collection.immutable.Set<Address> seenBy, scala.Option<Address> leader, scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> roleLeaderMap)  
      CurrentClusterState​(scala.collection.immutable.SortedSet<Member> members, scala.collection.immutable.Set<Member> unreachable, scala.collection.immutable.Set<Address> seenBy, scala.Option<Address> leader, scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> roleLeaderMap, scala.collection.immutable.Set<java.lang.String> unreachableDataCenters)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      scala.collection.immutable.SortedSet<Member> _1()  
      scala.collection.immutable.Set<Member> _2()  
      scala.collection.immutable.Set<Address> _3()  
      scala.Option<Address> _4()  
      scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> _5()  
      scala.collection.immutable.Set<java.lang.String> allDataCenters()
      All data centers in the cluster
      scala.collection.immutable.Set<java.lang.String> allRoles()
      All node roles in the cluster
      boolean canEqual​(java.lang.Object that)  
      ClusterEvent.CurrentClusterState copy​(scala.collection.immutable.SortedSet<Member> members, scala.collection.immutable.Set<Member> unreachable, scala.collection.immutable.Set<Address> seenBy, scala.Option<Address> leader, scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> roleLeaderMap)  
      scala.collection.immutable.SortedSet<Member> copy$default$1()  
      scala.collection.immutable.Set<Member> copy$default$2()  
      scala.collection.immutable.Set<Address> copy$default$3()  
      scala.Option<Address> copy$default$4()  
      scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> copy$default$5()  
      boolean equals​(java.lang.Object other)  
      java.util.Set<java.lang.String> getAllDataCenters()
      Java API: All data centers in the cluster
      java.util.Set<java.lang.String> getAllRoles()
      Java API: All node roles in the cluster
      Address getLeader()
      Java API: get address of current data center leader, or null if none
      java.lang.Iterable<Member> getMembers()
      Java API: get current member list.
      Address getRoleLeader​(java.lang.String role)
      Java API: get address of current leader, if any, within the data center that has the given role or null if no such node exists
      java.util.Set<Address> getSeenBy()
      Java API: get current &ldquo;seen-by&rdquo; set.
      java.util.Set<Member> getUnreachable()
      Java API: get current unreachable set.
      java.util.Set<java.lang.String> getUnreachableDataCenters()
      Java API: All data centers in the cluster
      int hashCode()  
      boolean isMemberUp​(Address address)
      INTERNAL API Returns true if the address is a cluster member and that member is MemberStatus.Up.
      scala.Option<Address> leader()  
      scala.collection.immutable.SortedSet<Member> members()  
      java.lang.String productPrefix()  
      scala.Option<Address> roleLeader​(java.lang.String role)
      get address of current leader, if any, within the data center that has the given role
      scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> roleLeaderMap()  
      scala.collection.immutable.Set<Address> seenBy()  
      java.lang.String toString()  
      scala.collection.immutable.Set<Member> unreachable()  
      scala.collection.immutable.Set<java.lang.String> unreachableDataCenters()  
      ClusterEvent.CurrentClusterState withUnreachableDataCenters​(scala.collection.immutable.Set<java.lang.String> unreachableDataCenters)
      Replace the set of unreachable datacenters with the given set
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface scala.Product

        productElementName, productElementNames, productIterator
      • Methods inherited from interface scala.Product5

        productArity, productElement
    • Constructor Detail

      • CurrentClusterState

        public CurrentClusterState​(scala.collection.immutable.SortedSet<Member> members,
                                   scala.collection.immutable.Set<Member> unreachable,
                                   scala.collection.immutable.Set<Address> seenBy,
                                   scala.Option<Address> leader,
                                   scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> roleLeaderMap,
                                   scala.collection.immutable.Set<java.lang.String> unreachableDataCenters)
      • CurrentClusterState

        public CurrentClusterState​(scala.collection.immutable.SortedSet<Member> members,
                                   scala.collection.immutable.Set<Member> unreachable,
                                   scala.collection.immutable.Set<Address> seenBy,
                                   scala.Option<Address> leader,
                                   scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> roleLeaderMap)
    • Method Detail

      • members

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

        public scala.collection.immutable.Set<Member> unreachable()
      • seenBy

        public scala.collection.immutable.Set<Address> seenBy()
      • leader

        public scala.Option<Address> leader()
      • roleLeaderMap

        public scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> roleLeaderMap()
      • unreachableDataCenters

        public scala.collection.immutable.Set<java.lang.String> unreachableDataCenters()
      • getMembers

        public java.lang.Iterable<Member> getMembers()
        Java API: get current member list.
        Returns:
        (undocumented)
      • getUnreachable

        public java.util.Set<Member> getUnreachable()
        Java API: get current unreachable set.
        Returns:
        (undocumented)
      • getUnreachableDataCenters

        public java.util.Set<java.lang.String> getUnreachableDataCenters()
        Java API: All data centers in the cluster
        Returns:
        (undocumented)
      • getSeenBy

        public java.util.Set<Address> getSeenBy()
        Java API: get current &ldquo;seen-by&rdquo; set.
        Returns:
        (undocumented)
      • getLeader

        public Address getLeader()
        Java API: get address of current data center leader, or null if none
        Returns:
        (undocumented)
      • roleLeader

        public scala.Option<Address> roleLeader​(java.lang.String role)
        get address of current leader, if any, within the data center that has the given role
        Parameters:
        role - (undocumented)
        Returns:
        (undocumented)
      • getRoleLeader

        public Address getRoleLeader​(java.lang.String role)
        Java API: get address of current leader, if any, within the data center that has the given role or null if no such node exists
        Parameters:
        role - (undocumented)
        Returns:
        (undocumented)
      • allRoles

        public scala.collection.immutable.Set<java.lang.String> allRoles()
        All node roles in the cluster
        Returns:
        (undocumented)
      • getAllRoles

        public java.util.Set<java.lang.String> getAllRoles()
        Java API: All node roles in the cluster
        Returns:
        (undocumented)
      • allDataCenters

        public scala.collection.immutable.Set<java.lang.String> allDataCenters()
        All data centers in the cluster
        Returns:
        (undocumented)
      • getAllDataCenters

        public java.util.Set<java.lang.String> getAllDataCenters()
        Java API: All data centers in the cluster
        Returns:
        (undocumented)
      • withUnreachableDataCenters

        public ClusterEvent.CurrentClusterState withUnreachableDataCenters​(scala.collection.immutable.Set<java.lang.String> unreachableDataCenters)
        Replace the set of unreachable datacenters with the given set
        Parameters:
        unreachableDataCenters - (undocumented)
        Returns:
        (undocumented)
      • isMemberUp

        public boolean isMemberUp​(Address address)
        INTERNAL API Returns true if the address is a cluster member and that member is MemberStatus.Up.
        Parameters:
        address - (undocumented)
        Returns:
        (undocumented)
      • copy

        public ClusterEvent.CurrentClusterState copy​(scala.collection.immutable.SortedSet<Member> members,
                                                     scala.collection.immutable.Set<Member> unreachable,
                                                     scala.collection.immutable.Set<Address> seenBy,
                                                     scala.Option<Address> leader,
                                                     scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> roleLeaderMap)
      • copy$default$1

        public scala.collection.immutable.SortedSet<Member> copy$default$1()
      • copy$default$2

        public scala.collection.immutable.Set<Member> copy$default$2()
      • copy$default$3

        public scala.collection.immutable.Set<Address> copy$default$3()
      • copy$default$4

        public scala.Option<Address> copy$default$4()
      • copy$default$5

        public scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> copy$default$5()
      • equals

        public boolean equals​(java.lang.Object other)
        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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

        public scala.collection.immutable.SortedSet<Member> _1()
        Specified by:
        _1 in interface scala.Product5<scala.collection.immutable.SortedSet<Member>,​scala.collection.immutable.Set<Member>,​scala.collection.immutable.Set<Address>,​scala.Option<Address>,​scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>>>
      • _2

        public scala.collection.immutable.Set<Member> _2()
        Specified by:
        _2 in interface scala.Product5<scala.collection.immutable.SortedSet<Member>,​scala.collection.immutable.Set<Member>,​scala.collection.immutable.Set<Address>,​scala.Option<Address>,​scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>>>
      • _3

        public scala.collection.immutable.Set<Address> _3()
        Specified by:
        _3 in interface scala.Product5<scala.collection.immutable.SortedSet<Member>,​scala.collection.immutable.Set<Member>,​scala.collection.immutable.Set<Address>,​scala.Option<Address>,​scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>>>
      • _4

        public scala.Option<Address> _4()
        Specified by:
        _4 in interface scala.Product5<scala.collection.immutable.SortedSet<Member>,​scala.collection.immutable.Set<Member>,​scala.collection.immutable.Set<Address>,​scala.Option<Address>,​scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>>>
      • _5

        public scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>> _5()
        Specified by:
        _5 in interface scala.Product5<scala.collection.immutable.SortedSet<Member>,​scala.collection.immutable.Set<Member>,​scala.collection.immutable.Set<Address>,​scala.Option<Address>,​scala.collection.immutable.Map<java.lang.String,​scala.Option<Address>>>
      • canEqual

        public boolean canEqual​(java.lang.Object that)
        Specified by:
        canEqual in interface scala.Equals
      • toString

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