Class ClusterEvent.CurrentClusterState

java.lang.Object
org.apache.pekko.cluster.ClusterEvent.CurrentClusterState
All Implemented Interfaces:
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<String,scala.Option<Address>>>
Enclosing class:
ClusterEvent

public static final class ClusterEvent.CurrentClusterState extends 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<String,scala.Option<Address>>>, Serializable
Current snapshot state of the cluster. Sent to new subscriber.

param: leader leader of the data center of this node param: memberTombstones INTERNAL API

See Also:
  • Constructor Details

    • 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<String,scala.Option<Address>> roleLeaderMap, scala.collection.immutable.Set<String> unreachableDataCenters, scala.collection.immutable.Set<UniqueAddress> memberTombstones)
  • Method Details

    • 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<String,scala.Option<Address>> roleLeaderMap()
    • unreachableDataCenters

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

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

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

      public Set<String> getUnreachableDataCenters()
      Java API: All data centers in the cluster
    • getSeenBy

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

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

      public scala.Option<Address> roleLeader(String role)
      get address of current leader, if any, within the data center that has the given role
    • getRoleLeader

      public Address getRoleLeader(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
    • allRoles

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

      public Set<String> getAllRoles()
      Java API: All node roles in the cluster
    • allDataCenters

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

      public Set<String> getAllDataCenters()
      Java API: All data centers in the cluster
    • withUnreachableDataCenters

      public ClusterEvent.CurrentClusterState withUnreachableDataCenters(scala.collection.immutable.Set<String> unreachableDataCenters)
      Replace the set of unreachable datacenters with the given set
    • withMemberTombstones

      public ClusterEvent.CurrentClusterState withMemberTombstones(scala.collection.immutable.Set<UniqueAddress> memberTombstones)
    • 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<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<String,scala.Option<Address>> copy$default$5()
    • equals

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

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

      public 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<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<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<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<String,scala.Option<Address>>>
    • _5

      public scala.collection.immutable.Map<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<String,scala.Option<Address>>>
    • canEqual

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

      public String toString()
      Overrides:
      toString in class Object