Class PersistenceExtension
Launches the Akka.Persistence runtime
Implements
Inherited Members
Namespace: Akka.Persistence
Assembly: Akka.Persistence.dll
Syntax
public class PersistenceExtension : IExtension
Constructors
| Edit this page View SourcePersistenceExtension(ExtendedActorSystem)
Creates a new Akka.Persistence extension.
Declaration
public PersistenceExtension(ExtendedActorSystem system)
Parameters
| Type | Name | Description |
|---|---|---|
| ExtendedActorSystem | system | The ActorSystem that will be using Akka.Persistence |
Remarks
DO NOT CALL DIRECTLY. Will be instantiated automatically be Akka.Persistence actors.
Exceptions
| Type | Condition |
|---|---|
| NullReferenceException | This exception is thrown when the default journal plugin, |
Properties
| Edit this page View SourceDefaultInternalStashOverflowStrategy
TBD
Declaration
public IStashOverflowStrategy DefaultInternalStashOverflowStrategy { get; }
Property Value
| Type | Description |
|---|---|
| IStashOverflowStrategy |
Settings
The Akka.Persistence settings for the journal and snapshot store
Declaration
public PersistenceSettings Settings { get; }
Property Value
| Type | Description |
|---|---|
| PersistenceSettings |
Methods
| Edit this page View SourceAdaptersFor(string)
Returns an EventAdapters object which serves as a per-journal collection of bound event adapters. If no adapters are registered for a given journal the EventAdapters object will simply return the identity adapter for each class, otherwise the most specific adapter matching a given class will be returned.
Declaration
public EventAdapters AdaptersFor(string journalPluginId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | journalPluginId | TBD |
Returns
| Type | Description |
|---|---|
| EventAdapters | TBD |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | This exception is thrown when either the plugin class name is undefined or the configuration path is missing. |
CheckJournalHealthAsync(string, CancellationToken)
Shortcut for invoking journal health checks.
Declaration
public Task<PersistenceHealthCheckResult> CheckJournalHealthAsync(string journalPluginId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | journalPluginId | The HOCON id of the Akka.Persistence plugin./ |
| CancellationToken | cancellationToken | An optional cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<PersistenceHealthCheckResult> | A PersistenceHealthCheckResult with health status and possibly a descriptive message. |
CheckSnapshotStoreHealthAsync(string, CancellationToken)
Shortcut for invoking snapshot store health checks.
Declaration
public Task<PersistenceHealthCheckResult> CheckSnapshotStoreHealthAsync(string snapshotStorePluginId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | snapshotStorePluginId | The HOCON id of the Akka.Persistence plugin. |
| CancellationToken | cancellationToken | An optional cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<PersistenceHealthCheckResult> | A PersistenceHealthCheckResult with health status and possibly a descriptive message. |
JournalFor(string)
Returns a journal plugin actor identified by journalPluginId.
When empty, looks in akka.persistence.journal.plugin to find configuration entry path.
When configured, uses journalPluginId as absolute path to the journal configuration entry.
Configuration entry must contain few required fields, such as class. See persistence.conf.
Declaration
public IActorRef JournalFor(string journalPluginId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | journalPluginId | TBD |
Returns
| Type | Description |
|---|---|
| IActorRef | TBD |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | This exception is thrown when either the plugin class name is undefined or the configuration path is missing. |
PersistenceId(IActorRef)
TBD
Declaration
public string PersistenceId(IActorRef actor)
Parameters
| Type | Name | Description |
|---|---|---|
| IActorRef | actor | TBD |
Returns
| Type | Description |
|---|---|
| string | TBD |
SnapshotStoreFor(string)
Returns a snapshot store plugin actor identified by snapshotPluginId.
When empty, looks in akka.persistence.snapshot-store.plugin to find configuration entry path.
When configured, uses snapshotPluginId as absolute path to the snapshot store configuration entry.
Configuration entry must contain few required fields, such as class. See persistence.conf.
Declaration
public IActorRef SnapshotStoreFor(string snapshotPluginId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | snapshotPluginId | TBD |
Returns
| Type | Description |
|---|---|
| IActorRef | TBD |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | This exception is thrown when either the plugin class name is undefined or the configuration path is missing. |
Edit this page