DurableStateStore
Defined in: src/persistence/DurableStateStore.ts:31
Methods
Section titled “Methods”close()?
Section titled “close()?”
optionalclose():Promise<void>
Defined in: src/persistence/DurableStateStore.ts:67
Best-effort teardown; idempotent.
Journal and SnapshotStore have carried this since they were written;
DurableStateStore was the one contract of the three without it, even
though its implementations hold exactly the same kind of resource — a
connection pool, an HTTP client, a SQLite file handle. Callers that own a
store therefore had no contractual way to release it, and the test suite
leaned on closeQuietly probing for the method.
Returns
Section titled “Returns”Promise<void>
delete()
Section titled “delete()”delete(
persistenceId):Promise<void>
Defined in: src/persistence/DurableStateStore.ts:55
Remove the record entirely. Idempotent.
Parameters
Section titled “Parameters”persistenceId
Section titled “persistenceId”string
Returns
Section titled “Returns”Promise<void>
load()
Section titled “load()”load<
S>(persistenceId,options?):Promise<Option<DurableStateRecord<S>>>
Defined in: src/persistence/DurableStateStore.ts:52
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>>>
upsert()
Section titled “upsert()”upsert<
S>(persistenceId,expectedRevision,state,options?):Promise<DurableStateRecord<S>>
Defined in: src/persistence/DurableStateStore.ts:40
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>>
