Skip to content

@yantrix/automata v0.6.0 • Docs


Yantrix API / @yantrix/automata / IStorageAdapter

Interface: IStorageAdapter<SnapshotType> ​

Persistence adapter for one complete or projected Data Model snapshot.

A null load result means that the Storage has no persisted snapshot yet. Platform-specific transports belong in implementations, not in ModelStore.

Type Parameters ​

• SnapshotType = unknown

Properties ​

saveConditionally()? ​

ts
optional saveConditionally: (snapshot, validateCurrent) => Promise<void>;

Validate the stored snapshot and save if the validator returns normally, using the connector's concurrency guarantees.

Parameters ​

• snapshot: SnapshotType

• validateCurrent

Returns ​

Promise<void>