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.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InMemoryDurableStateStore():
InMemoryDurableStateStore
Returns
Section titled “Returns”InMemoryDurableStateStore
Methods
Section titled “Methods”delete()
Section titled “delete()”delete(
persistenceId):Promise<void>
Defined in: src/persistence/durable-state-stores/InMemoryDurableStateStore.ts:41
Remove the record entirely. Idempotent.
Parameters
Section titled “Parameters”persistenceId
Section titled “persistenceId”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”load()
Section titled “load()”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.
Type Parameters
Section titled “Type Parameters”S
Parameters
Section titled “Parameters”persistenceId
Section titled “persistenceId”string
_options?
Section titled “_options?”PersistenceOptions
Returns
Section titled “Returns”Promise<Option<DurableStateRecord<S>>>
Implementation of
Section titled “Implementation of”upsert()
Section titled “upsert()”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.
Type Parameters
Section titled “Type Parameters”S
Parameters
Section titled “Parameters”persistenceId
Section titled “persistenceId”string
expectedRevision
Section titled “expectedRevision”number
S
_options?
Section titled “_options?”PersistenceOptions
Returns
Section titled “Returns”Promise<DurableStateRecord<S>>