コンテンツにスキップ
日本語

PersistenceExtension

このコンテンツはまだ日本語訳がありません。

Defined in: src/persistence/PersistenceExtension.ts:16

System-wide access point to the currently-configured journal and snapshot store. Plug-ins register a new factory through registerJournal / registerSnapshotStore; the active plug-in is chosen by the HOCON config path actor-ts.persistence.journal.plugin (defaults to the in-memory reference implementation).

new PersistenceExtension(system): PersistenceExtension

Defined in: src/persistence/PersistenceExtension.ts:23

ActorSystem

PersistenceExtension

get journal(): Journal

Defined in: src/persistence/PersistenceExtension.ts:41

Resolve the active journal, instantiating it on first use.

Journal


get snapshotStore(): SnapshotStore

Defined in: src/persistence/PersistenceExtension.ts:58

Resolve the active snapshot store, instantiating it on first use.

SnapshotStore

configure(stores): void

Defined in: src/persistence/PersistenceExtension.ts:84

Set the active journal and/or snapshot store in one call — a thin convenience over setJournal / setSnapshotStore for tests and simple, single-backend apps that wire persistence directly in code rather than through the config-selected registerXxxPlugins helpers.

Journal

SnapshotStore

void


registerJournal(pluginId, factory): void

Defined in: src/persistence/PersistenceExtension.ts:29

string

(system) => Journal

void


registerSnapshotStore(pluginId, factory): void

Defined in: src/persistence/PersistenceExtension.ts:35

string

(system) => SnapshotStore

void


setJournal(journal): void

Defined in: src/persistence/PersistenceExtension.ts:75

Replace the active journal in code — useful for tests that need a spy.

Journal

void


setSnapshotStore(snapshotStore): void

Defined in: src/persistence/PersistenceExtension.ts:76

SnapshotStore

void