Field Notes
    Preparing search index...

    Implements

    • HubBackend
    Index
    sharedAcrossInstances: true

    True when every hub instance addresses the same atomic backing state (for example Redis).

    • Writes atomically when the stored record's version and editor equal expected (absent equals absent; null: no record may exist). Comparing the editor keeps two instances from both winning an equal-version race. clear ignores it and requires its expected map to match every element exactly. A clear's tombstone ids equal its expected keys; backends should reject one where they differ.

      Parameters

      • room: string
      • write: ElementWrite
      • expected: { editor?: string; version: number } | null

      Returns Promise<{ ok: true } | { current: HubRecord | undefined; ok: false }>

    • Parameters

      • room: string
      • record: LayerRecord

      Returns Promise<void>

    • Called after roomIdleTimeoutMs with no local connection; drops only state held in process memory.

      Parameters

      • room: string

      Returns Promise<void>

    • Parameters

      • room: string
      • id: string

      Returns Promise<LayerRecord | undefined>

    • Parameters

      • room: string
      • id: string

      Returns Promise<HubRecord | undefined>

    • Type Parameters

      • T

      Parameters

      • key: ServiceKey<T>

      Returns T | undefined

    • Parameters

      • room: string

      Returns Promise<LayerRecord[]>

    • Live elements and unexpired tombstones of a room.

      Parameters

      • room: string

      Returns Promise<{ elements: SyncElement[]; tombstones: StoredTombstone[] }>