Skip to content

CassandraSnapshotStore

Defined in: src/persistence/snapshot-stores/CassandraSnapshotStore.ts:35

SnapshotStore backed by Cassandra/Scylla. Schema mirrors the journal: clustered on sequence_nr DESC so loadLatest is a single-row read. When keepN > 0, excess snapshots are pruned on each save.

new CassandraSnapshotStore(options): CassandraSnapshotStore

Defined in: src/persistence/snapshot-stores/CassandraSnapshotStore.ts:43

CassandraSnapshotStoreOptions

CassandraSnapshotStore

close(): Promise<void>

Defined in: src/persistence/snapshot-stores/CassandraSnapshotStore.ts:116

Best-effort teardown.

Promise<void>

SnapshotStore.close


delete(pid, toSeq): Promise<void>

Defined in: src/persistence/snapshot-stores/CassandraSnapshotStore.ts:103

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

string

number

Promise<void>

SnapshotStore.delete


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

Defined in: src/persistence/snapshot-stores/CassandraSnapshotStore.ts:93

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

S

string

number

PersistenceOptions

Promise<Option<Snapshot<S>>>

SnapshotStore.loadBefore


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

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

Load the newest snapshot for pid, 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>(pid, seq, state, _options?): Promise<Snapshot<S>>

Defined in: src/persistence/snapshot-stores/CassandraSnapshotStore.ts:65

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


start(): Promise<void>

Defined in: src/persistence/snapshot-stores/CassandraSnapshotStore.ts:50

Promise<void>