Interface: ActivityStorageAdapter
@roomful/core / ActivityStorageAdapter
Interface: ActivityStorageAdapter
Section titled “Interface: ActivityStorageAdapter”Defined in: packages/core/src/engines/activity-storage.ts:13
A room-scoped persistence backend for the activity feed.
The activity engine calls load once on startup to restore entries (merged into the live
feed), and save after every change with the full feed (newest first, already capped at
the engine’s limit). Back it with Postgres, SQLite, Redis, a file, or any durable store — see
docs/reference/activity-storage.md.
Methods
Section titled “Methods”load()
Section titled “load()”load():
Promise<readonlyActivityEntry[]>
Defined in: packages/core/src/engines/activity-storage.ts:19
Returns the persisted entries for the room (empty when there are none).
Returns
Section titled “Returns”Promise<readonly ActivityEntry[]>
The stored entries.
save()
Section titled “save()”save(
entries):Promise<void>
Defined in: packages/core/src/engines/activity-storage.ts:28
Persists the full feed. Called after every change; an implementation may upsert or diff internally.
Parameters
Section titled “Parameters”entries
Section titled “entries”readonly ActivityEntry[]
The current feed to persist (newest first).
Returns
Section titled “Returns”Promise<void>
A promise that resolves once the write completes.