RelayStore class abstract
Pluggable, CRDT-agnostic persistence for relay rooms.
A relay room persists an append-only log of opaque change blobs plus, at most, one snapshot. The store never interprets the blobs: assembling them into a CRDT document is entirely a client concern.
The default implementation is InMemoryRelayStore.
- Implementers
Constructors
Properties
Methods
-
append(
String roomId, List< String> blobs) → Future<int> -
Appends
blobsin order to theroomIdlog, assigning one sequence number per blob. Returns the last assigned sequence number. -
deleteRoom(
String roomId) → Future< void> -
Deletes every trace of
roomId -
getSnapshot(
String roomId) → Future< RelaySnapshotRecord?> -
The latest
roomIdsnapshot, if any -
lastSeq(
String roomId) → Future< int> -
The last sequence number assigned for
roomId(0if none). -
logLength(
String roomId) → Future< int> -
The current
roomIdlog length -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readLog(
String roomId, {int afterSeq = 0}) → Future< List< RelayLogEntry> > -
The
roomIdlog entries with a sequence number greater thanafterSeq, ordered by sequence number. -
saveSnapshot(
String roomId, RelaySnapshotRecord snapshot) → Future< void> -
Stores
snapshotas the latestroomIdsnapshot and deletes the log entries it covers (sequence number<=RelaySnapshotRecord.upToSeq). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited