InMemoryCRDTServerRegistry constructor

InMemoryCRDTServerRegistry({
  1. Map<String, CRDTDocument>? documents,
  2. Map<String, Snapshot>? snapshots,
})

In-memory implementation of CRDTServerRegistry.

This implementation stores all documents in memory using a Map. Documents are lost when the server restarts.

Creates a new InMemoryCRDTServerRegistry

Implementation

InMemoryCRDTServerRegistry({
  Map<String, CRDTDocument>? documents,
  Map<String, Snapshot>? snapshots,
})  : _documents = documents ?? <String, CRDTDocument>{},
      _snapshots = snapshots ?? <String, Snapshot>{};