콘텐츠로 이동
한국어

CachedSnapshotStore

이 콘텐츠는 아직 번역되지 않았습니다.

Defined in: src/persistence/snapshot-stores/CachedSnapshotStore.ts:51

Pluggable snapshot store. Snapshots short-circuit recovery by fast- forwarding the state machine to a known point, so replay only needs to apply events newer than the snapshot.

new CachedSnapshotStore(underlying, options): CachedSnapshotStore

Defined in: src/persistence/snapshot-stores/CachedSnapshotStore.ts:56

SnapshotStore

CachedSnapshotStoreOptions

CachedSnapshotStore

close(): Promise<void>

Defined in: src/persistence/snapshot-stores/CachedSnapshotStore.ts:94

Best-effort teardown.

Promise<void>

SnapshotStore.close


delete(persistenceId, toSeq): Promise<void>

Defined in: src/persistence/snapshot-stores/CachedSnapshotStore.ts:89

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/CachedSnapshotStore.ts:84

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/CachedSnapshotStore.ts:74

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/CachedSnapshotStore.ts:67

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