SessionEndedEvent class final

Emitted when this node's coordination session has ended.

Every path that loses the coordinator funnels through here — a coordinator that announced its departure, one that stopped answering, one whose transport endpoint vanished, and an eviction — so an application only has to listen in one place. What the session does next is CoordinationSessionConfig.coordinatorLossPolicy; this event is emitted under every policy, including CoordinatorLossPolicy.remainOpen.

Under CoordinatorLossPolicy.reelect this fires for the old session and the node then carries on into a new one, so treat it as "the coordinator changed under me", not necessarily as "stop".

Inheritance

Constructors

SessionEndedEvent({required SessionEndReason reason, required CoordinatorLossPolicy policy, String? coordinatorUId, required String fromNodeUId, String? messageId, String? parentMessageId, DateTime? timestamp, MessageTiming? timing})

Properties

coordinatorUId → String?
The coordinator that went away, if this node knew which one it was.
final
fromNodeUId → String
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
messageId → String
finalinherited
parentMessageId → String?
finalinherited
policy → CoordinatorLossPolicy
What the session is doing about it.
final
reason → SessionEndReason
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timestamp → DateTime
finalinherited
timing → MessageTiming?
How long this event's message took to reach us, as the transport measured it — see MessageTiming.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited