Interface ReconnectState
- All Known Implementing Classes:
ReconnectState.Connected, ReconnectState.Disconnected, ReconnectState.GivingUp, ReconnectState.Reconnecting
public sealed interface ReconnectState
permits ReconnectState.Connected, ReconnectState.Disconnected, ReconnectState.Reconnecting, ReconnectState.GivingUp
Closed state machine describing the lifecycle of a reconnect controller.
Each variant carries the wall-clock timestamp() at which the
transition was observed. Consumers dispatch with an exhaustive switch
over ReconnectState; the compiler enforces coverage.
ReconnectState.Connected— pipe is live; no reconnect is in progress.ReconnectState.Disconnected— most recent disconnect, before any retry begins. Used as a transient transition state; the controller may move toReconnectState.Reconnectingimmediately afterward.ReconnectState.Reconnecting— a retry attempt is scheduled or in flight.ReconnectState.Reconnecting.attempt()is 1-indexed.ReconnectState.GivingUp— nothing is retrying any more: the attempt budget ran out, the client's pipe cannot come back, or the user stopped retrying. The host may still start a fresh recovery on request.
This type lives in the api module (not core.rpc) so that
ReconnectStateChangedEvent can reference it without inverting the
module dependency direction.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic final recordstatic final record -
Method Summary
-
Method Details
-
timestamp
long timestamp()
-