InMemoryRelayStore class
In-memory RelayStore implementation.
Room state lives only for the lifetime of the process: a relay backed by this store starts empty on every restart and re-fills from the connected clients (each client re-pushes its whole document state on re-sync).
- Implemented types
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.override -
deleteRoom(
String roomId) → Future< void> -
Deletes every trace of
roomIdoverride -
getSnapshot(
String roomId) → Future< RelaySnapshotRecord?> -
The latest
roomIdsnapshot, if anyoverride -
lastSeq(
String roomId) → Future< int> -
The last sequence number assigned for
roomId(0if none).override -
logLength(
String roomId) → Future< int> -
The current
roomIdlog lengthoverride -
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.override -
saveSnapshot(
String roomId, RelaySnapshotRecord snapshot) → Future< void> -
Stores
snapshotas the latestroomIdsnapshot and deletes the log entries it covers (sequence number<=RelaySnapshotRecord.upToSeq).override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited