CurrentClusterState
Defined in: src/cluster/ClusterEvents.ts:51
The cluster as it stands at the moment of subscription — the single event a
replayMode: 'snapshot' subscriber receives before the live stream starts
(#161).
The other replay form ('events', still the default) states the same
membership as the events that would have produced it: one MemberJoined per
member plus the status event each has already reached. That form suits a
listener that only reacts to deltas, because it needs no separate
initial-state branch; it costs one callback per member, and it never says
where the replay ends. This one is the opposite trade, and the reason it
exists.
unreachable is a subset of members, not a disjoint set: an
unreachable peer is still a member, and excluding it would make
members.length mean something different depending on the cluster’s health.
There is no seenBy. Akka’s is the set of members that have observed the
current gossip version, which presumes a versioned whole; gossip here merges
member records individually, so there is no such version to have been seen.
Never published on the event stream: it describes one subscriber’s starting point, not something that happened to the cluster.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CurrentClusterState(
members,unreachable,leader):CurrentClusterState
Defined in: src/cluster/ClusterEvents.ts:52
Parameters
Section titled “Parameters”members
Section titled “members”readonly Member[]
Every current member — tombstones excluded — in address order.
unreachable
Section titled “unreachable”readonly Member[]
The members of members whose status is unreachable.
leader
Section titled “leader”Returns
Section titled “Returns”CurrentClusterState
Properties
Section titled “Properties”leader
Section titled “leader”Defined in: src/cluster/ClusterEvents.ts:57
members
Section titled “members”
readonlymembers: readonlyMember[]
Defined in: src/cluster/ClusterEvents.ts:54
Every current member — tombstones excluded — in address order.
unreachable
Section titled “unreachable”
readonlyunreachable: readonlyMember[]
Defined in: src/cluster/ClusterEvents.ts:56
The members of members whose status is unreachable.
