Skip to content

InMemoryDurableStateStore

Defined in: src/persistence/durable-state-stores/InMemoryDurableStateStore.ts:13

Reference Durable State store backed by a JS Map. Useful for tests and single-process development; swap for a SQLite/Cassandra store in production.

new InMemoryDurableStateStore(): InMemoryDurableStateStore

InMemoryDurableStateStore

delete(persistenceId): Promise<void>

Defined in: src/persistence/durable-state-stores/InMemoryDurableStateStore.ts:41

Remove the record entirely. Idempotent.

string

Promise<void>

DurableStateStore.delete


load<S>(persistenceId, _options?): Promise<Option<DurableStateRecord<S>>>

Defined in: src/persistence/durable-state-stores/InMemoryDurableStateStore.ts:37

Load the latest record for persistenceId, or None if none exists. options.encryption is required when client-side encryption was used at write time.

S

string

PersistenceOptions

Promise<Option<DurableStateRecord<S>>>

DurableStateStore.load


upsert<S>(persistenceId, expectedRevision, state, _options?): Promise<DurableStateRecord<S>>

Defined in: src/persistence/durable-state-stores/InMemoryDurableStateStore.ts:16

Upsert the state for persistenceId. expectedRevision must match the current stored revision (0 when no record exists yet). Throws DurableStateConcurrencyError on conflict. Optional options carry per-call preferences from the caller (e.g. compression / encryption set on the actor); stores that cannot honour them silently ignore the field.

S

string

number

S

PersistenceOptions

Promise<DurableStateRecord<S>>

DurableStateStore.upsert