CoordinationSessionConfig class

Implemented types

Constructors

CoordinationSessionConfig({required String name, int maxNodes = 10, int minNodes = 1, Duration heartbeatInterval = const Duration(seconds: 5), Duration discoveryInterval = const Duration(seconds: 10), Duration nodeTimeout = const Duration(seconds: 15), bool consumeCoordinationStreamAsCoordinator = true, ClockSyncConfig clockSyncConfig = const ClockSyncConfig(), CoordinatorLossPolicy coordinatorLossPolicy = CoordinatorLossPolicy.endSession})

Properties

clockSyncConfig → ClockSyncConfig
Tuning for peer clock-offset estimation.
final
consumeCoordinationStreamAsCoordinator → bool
Determines whether on becoming coordinator, the node should also consume the coordination stream - specifically, this is used for a coordinator to be able to consume UserMessages (UserCoordinationMessage) within the coordination session, this allows for a session coordinator to also act as a participant in the session, and have similar latency characteristics as other nodes. Default is true.
final
coordinatorLossPolicy → CoordinatorLossPolicy
What this node does if the coordinator goes away.
final
description → String?
Returns a description of the identity.
no setteroverride
discoveryInterval → Duration
How often to search for new nodes (should be less than nodeTimeout).
final
hashCode → int
The hash code for this object.
no setteroverride
heartbeatInterval → Duration
How often nodes should emit heartbeats to indicate they are alive.
final
id → String
Returns a unique identifier for the identity.
no setteroverride
maxNodes → int
Maximum number of nodes allowed in the session. if maxNodes < 1, it means unlimited.
final
minNodes → int
Minimum number of nodes required in the session.
final
name → String
Human-readable name for the session.
final
nodeTimeout → Duration
The amount of time to wait before considering a node disconnected if no heartbeat is received. This should be at least twice the heartbeatInterval.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? name, int? maxNodes, int? minNodes, Duration? heartbeatInterval, Duration? discoveryInterval, Duration? nodeTimeout, bool? consumeCoordinationStreamAsCoordinator, ClockSyncConfig? clockSyncConfig, CoordinatorLossPolicy? coordinatorLossPolicy}) → CoordinationSessionConfig
Creates a copy with modified values
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
Converts the object to a map representation for serialization.
override
toString() → String
A string representation of this object.
override
validate({bool throwOnError = false}) → bool
Validates the configuration.
override

Operators

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

Static Methods

standard() → CoordinationSessionConfig