Aller au contenu
Français

DynamoDbSnapshotStore

Ce contenu n’est pas encore disponible dans votre langue.

Defined in: src/persistence/snapshot-stores/DynamoDbSnapshotStore.ts:36

SnapshotStore backed by Amazon DynamoDB.

Partition key pid, sort key seq, so loadLatest is a descending query limited to one item — the cheapest read DynamoDB offers — and re-saving at an existing sequence number simply overwrites the item, no conditional write needed.

PersistenceOptions (compression, encryption) are ignored, matching the SQL, Cassandra and MongoDB stores; the object-storage store is the one that honours them.

new DynamoDbSnapshotStore(options?): DynamoDbSnapshotStore

Defined in: src/persistence/snapshot-stores/DynamoDbSnapshotStore.ts:42

DynamoDbSnapshotStoreOptions = {}

DynamoDbSnapshotStore

DynamoDbStore.constructor

close(): Promise<void>

Defined in: src/persistence/LazyStore.ts:66

Best-effort teardown.

Promise<void>

SnapshotStore.close

DynamoDbStore.close


delete(persistenceId, toSeq): Promise<void>

Defined in: src/persistence/snapshot-stores/DynamoDbSnapshotStore.ts:112

Delete snapshots up to and including toSeq. Useful for pruning.

string

number

Promise<void>

SnapshotStore.delete


loadBefore<S>(persistenceId, seq, _options?): Promise<Option<Snapshot<S>>>

Defined in: src/persistence/snapshot-stores/DynamoDbSnapshotStore.ts:96

Load the newest snapshot with sequenceNr < seq, or None.

S

string

number

PersistenceOptions

Promise<Option<Snapshot<S>>>

SnapshotStore.loadBefore


loadLatest<S>(persistenceId, _options?): Promise<Option<Snapshot<S>>>

Defined in: src/persistence/snapshot-stores/DynamoDbSnapshotStore.ts:83

Load the newest snapshot for persistenceId, or None if none exist. options.encryption is required when client-side encryption was used at write time — the store has no other way to obtain the master key. Stores that don’t encrypt ignore the field.

S

string

PersistenceOptions

Promise<Option<Snapshot<S>>>

SnapshotStore.loadLatest


save<S>(persistenceId, seq, state, _options?): Promise<Snapshot<S>>

Defined in: src/persistence/snapshot-stores/DynamoDbSnapshotStore.ts:63

Persist a snapshot at seq — typically the seq of the latest event applied. 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<Snapshot<S>>

SnapshotStore.save