iya-sts
    Preparing search index...

    The directory as a bounded window onto the store, in the shape of realms.map() (#349).

    Index
    • Builds the window. It asks nothing of the store until attach().

      Parameters

      • deps: WindowDeps

        the realm hooks, the containers, the bound and the registry

      Returns export=

    • Puts an entry the STORE holds: not a write. For a restore and for a row another process wrote.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      • entry: Entry

        the entry

      Returns void

    • Whether any windowed entry of a realm holds an attribute: a change made here first, then the store.

      Parameters

      • realmId: string

        the realm id

      • attribute: string

        the attribute name, lower-cased as stored

      Returns boolean

      true when one does

    • Gives the window its bridge, once the store is open, and drops every CLEAN answer given before it — an absence recorded before the store could be asked is not an absence.

      Parameters

      • bridge: Bridge

        the synchronous question to the store

      Returns void

    • Whether a key has a change here not yet written, or one in flight, or was handed out since the last flush — the states in which a row from another process must wait for the flush rather than replace it.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      Returns boolean

      true when the flush must go first

    • A realm's count for ldap.maxEntries: the store's, read again when the last reading is more than ten seconds old, plus this process's own net since. Stale by at most that much for another process's creates; the ceiling is a ceiling, not a quota to the entry.

      Parameters

      • realmId: string

        the realm id

      Returns number

      the count

    • Empties a realm: the restore's replaceRealm(). Changes not yet written are dropped with the rest — a restore is "this is the directory".

      Parameters

      • realmId: string

        the realm id

      Returns void

    • What the flush writes for the windowed keys, and the release of every entry handed out and left unchanged.

      Parameters

      • named: Set<string>

        the journal's keys (without a realm), or null when a write named nothing: then every held and evicted-but-held entry is a candidate

      Returns { deletes: Change[]; upserts: Change[] }

      the upserts (entry, json, base) and deletes (base)

    • The flush wrote what collect() answered: each base is what was sent, and a key unchanged since is released. A key the store answered differently for (outcomes) is forgotten, or — changed again since — given the store's row as its base.

      Parameters

      • changes: { deletes: Change[]; upserts: Change[] }

        what collect() answered

      • Optionaloutcomes: { entry?: Entry; key: string; outcome: string; realm: string }[]

        the driver's { realm, key, outcome, entry } rows

      Returns void

    • How many entries are strictly under a base, from the store's count and this process's changes not yet written.

      Parameters

      • realmId: string

        the realm id

      • base: string

        the base's normalised DN

      Returns number

      the count

    • Removes a key: a write, pinned until the flush writes it.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      Returns boolean

      true when it held an entry

    • Hands fn the NAMES of the entries under a base in the store, a page at a time — { key, dn, origin, uid }, no entry read whole — and counts the ones fn answers true for. For the identity register a windowed worker fills at start (#349).

      Parameters

      • realmId: string

        the realm id

      • base: string

        the base's normalised DN

      • fn: (name: { dn: string; key: string; origin: string; uid: string }) => boolean

        called with each name; its truthy answers are counted

      Returns number

      how many fn answered true for

    • Calls fn for each RESIDENT entry of a realm: for a walk whose filter can only match an entry outside the windowed containers.

      Parameters

      • realmId: string

        the realm id

      • fn: (entry: Entry, key: string) => void

        called with each entry and its key

      Returns void

    • A realm's count read from the store now, for ldap.maxEntries and for a report.

      Parameters

      • realmId: string

        the realm id

      Returns number

      the count

    • The facade ldap_server.js holds as entries: the ambient realm's view for every Map member, realmMap(id) for a named realm, and the window itself as window.

      Returns any

      the facade

    • The flush failed: the keys it took are still changed, and are taken again by the next one.

      Parameters

      • changes: { deletes: Change[]; upserts: Change[] }

        what collect() answered

      Returns void

    • The windowed entries of a realm matching an indexed question, as this process holds them.

      Parameters

      • realmId: string

        the realm id

      • name: string

        one of persistence/directory_queries.js's queries

      • args: unknown[]

        its arguments

      • predicate: (entry: Entry, key: string) => boolean

        the service's own rule, asked of each candidate

      Returns { entry: Entry; key: string }[]

      [{ key, entry }], in key order, local additions last

    • Forgets a key: a row another process wrote or removed, read again when next asked for. A resident key is removed.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      Returns boolean

      true when something was held

    • The entry at a key, or undefined.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      Returns Entry

      the entry

    • Whether anything is under a key.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      Returns boolean

      true when something is

    • Whether a key holds an entry.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      Returns boolean

      true when it does

    • The windowed entries under a base that hold an attribute, as this process holds them: the store's holders a page at a time, each read back through the window and asked predicate, and changes made here added.

      Parameters

      • realmId: string

        the realm id

      • base: string

        the base's normalised DN (a windowed container, usually)

      • attribute: string

        the attribute name, lower-cased as stored

      • predicate: (entry: Entry, key: string) => boolean

        the service's own rule, asked of each candidate

      Returns { entry: Entry; key: string }[]

      [{ key, entry }]

    • Whether a key of a realm is windowed: strictly under one of its windowed containers.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      Returns boolean

      true when windowed

    • Another process changed a key this one is busy with: once this process's flush has let it go — written and merged by the store, or found unchanged — it is dropped, and read again when next asked for. Without this a key merely HANDED OUT when the change arrived would keep the older copy until it was evicted.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      Returns void

    • The entry held at a key, without asking the store and without handing it out: persistence.js's entryAt() for a windowed key.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      Returns Entry

      the entry, or null

    • The resident entries of a realm, keyed: what persistence.js's write shadow covers. A windowed entry is never in that shadow — the window holds its own base.

      Parameters

      • realmId: string

        the realm id

      Returns { entry: Entry; key: string }[]

      [{ key, entry }]

    • Puts an entry at a key: a write, pinned until the flush writes it.

      Parameters

      • realmId: string

        the realm id

      • key: string

        the normalised DN

      • entry: Entry

        the entry

      Returns void

    • How many entries a realm holds, from the store's count of the windowed containers the first time and this process's own net since.

      Parameters

      • realmId: string

        the realm id

      Returns number

      the count

    • The window's figures, for a status page and tests.

      Returns Record<string, unknown>

      the LRU's figures, and the dirty, in-flight, handed-out and evicted-but-held counts

    • A Map-shaped view of one realm.

      Parameters

      • realmId: string

        the realm id

      Returns any

      the view

    • Walks a realm's entries at or under a base, lazily.

      Parameters

      • realmId: string

        the realm id

      • base: string

        the base's normalised DN, or '' for the whole realm

      • OptionalreadOnly: boolean

        true when the caller edits nothing it is handed

      Returns Generator<[string, Entry]>

      an iterator of [key, entry]