ObjectStorageDurableStateStore
Defined in: src/persistence/durable-state-stores/ObjectStorageDurableStateStore.ts:61
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ObjectStorageDurableStateStore(
opts):ObjectStorageDurableStateStore
Defined in: src/persistence/durable-state-stores/ObjectStorageDurableStateStore.ts:68
Parameters
Section titled “Parameters”ObjectStorageDurableStateStoreOptions
Returns
Section titled “Returns”ObjectStorageDurableStateStore
Methods
Section titled “Methods”close()
Section titled “close()”close():
Promise<void>
Defined in: src/persistence/durable-state-stores/ObjectStorageDurableStateStore.ts:195
Returns
Section titled “Returns”Promise<void>
delete()
Section titled “delete()”delete(
pid):Promise<void>
Defined in: src/persistence/durable-state-stores/ObjectStorageDurableStateStore.ts:190
Remove the record entirely. Idempotent.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”forgetEtagForTest()
Section titled “forgetEtagForTest()”forgetEtagForTest(
pid):void
Defined in: src/persistence/durable-state-stores/ObjectStorageDurableStateStore.ts:201
Test hook — drop the cached ETag for a pid (simulates actor restart).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
load()
Section titled “load()”load<
S>(pid,options?):Promise<Option<DurableStateRecord<S>>>
Defined in: src/persistence/durable-state-stores/ObjectStorageDurableStateStore.ts:75
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”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>(pid,expectedRevision,state,options?):Promise<DurableStateRecord<S>>
Defined in: src/persistence/durable-state-stores/ObjectStorageDurableStateStore.ts:100
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”string
expectedRevision
Section titled “expectedRevision”number
S
options?
Section titled “options?”PersistenceOptions
Returns
Section titled “Returns”Promise<DurableStateRecord<S>>