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

InMemoryRelayStore()

Properties

hashCode int
The hash code for this object.
no setterinherited
roomIds Future<Set<String>>
The ids of the rooms with persisted state
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

append(String roomId, List<String> blobs) Future<int>
Appends blobs in order to the roomId log, assigning one sequence number per blob. Returns the last assigned sequence number.
override
deleteRoom(String roomId) Future<void>
Deletes every trace of roomId
override
getSnapshot(String roomId) Future<RelaySnapshotRecord?>
The latest roomId snapshot, if any
override
lastSeq(String roomId) Future<int>
The last sequence number assigned for roomId (0 if none).
override
logLength(String roomId) Future<int>
The current roomId log length
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readLog(String roomId, {int afterSeq = 0}) Future<List<RelayLogEntry>>
The roomId log entries with a sequence number greater than afterSeq, ordered by sequence number.
override
saveSnapshot(String roomId, RelaySnapshotRecord snapshot) Future<void>
Stores snapshot as the latest roomId snapshot 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