Skip to main content
Defined in: durability/file.ts:216 DurabilityBackend persisted to a JSON file (single process).

Extends

Properties

inbox

Defined in: durability/journal.ts:383

Inherited from

KvDurability.inbox

outbox

Defined in: durability/journal.ts:384

Inherited from

KvDurability.outbox

exclusive

Defined in: durability/journal.ts:385 true when only one process can use the backend at a time (memory, file). A restarted process then knows every lease of its instanceId is its own dead incarnation’s.

Inherited from

KvDurability.exclusive

scopeName

Defined in: durability/journal.ts:387 The scope of this view (undefined = the unscoped tables).

Inherited from

KvDurability.scopeName

kv

Defined in: durability/journal.ts:388

Inherited from

KvDurability.kv

Methods

open()

Defined in: durability/file.ts:233 Open (or create) the journal at filePath.

Parameters

Returns

Promise<FileDurability>

Throws

when another live process holds the lock, another open journal of this process holds it, or the file is not a valid journal.

close()

Defined in: durability/file.ts:315 Wait for pending writes and release the lock file. Idempotent; later writes reject (a closed journal never writes without its lock). The bot does NOT call this on stop() (a restart reuses the instance).

Returns

Promise<void>

scope()

Defined in: durability/journal.ts:397 A view over the same KV holding only the records of name (tables inbox:<name> / outbox:<name>).

Parameters

Returns

KvDurability

Inherited from

KvDurability.scope

start()

Defined in: durability/journal.ts:402 Called by bot.start() before anything is replayed.

Returns

Promise<void>

Inherited from

KvDurability.start

stop()

Defined in: durability/journal.ts:403 Called by bot.stop() after the provider stopped.

Returns

Promise<void>

Inherited from

KvDurability.stop

Accessors

locked

Get Signature

Defined in: durability/file.ts:226 The file is held under the advisory lock and the journal is not closed.
Returns
boolean