SyncMessage class abstract
Base class for the CRDT-aware sync protocol messages (server-client mode).
These messages carry decoded CRDT payloads (Change, Snapshot,
VersionVector) and use the core type-code range (MessageType, 0-8).
- Inheritance
- Implementers
Constructors
- SyncMessage(MessageTypeValue type, String documentId)
-
Constructor
const
- SyncMessage.change({required String documentId, required Change change})
-
Create a change message
factory
-
SyncMessage.changes({required String documentId, required List<
Change> changes}) -
Create a changes message
factory
-
SyncMessage.documentStatus({required String documentId, required Snapshot? snapshot, required List<
Change> ? changes, required VersionVector versionVector}) -
Create a document status message
factory
- SyncMessage.documentStatusRequest({required String documentId, required VersionVector? versionVector})
-
Create a document status request message
factory
Properties
- documentId → String
-
The document ID to which the message refers
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → MessageTypeValue
-
The message type
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
) → String -
Serialize the message to a JSON string
inherited
-
toJson(
) → Map< String, dynamic> -
Convert the message to a JSON map
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited