Class LocalSnapshotStore
Local file-based SnapshotStore implementation.
Implements
Inherited Members
Namespace: Akka.Persistence.Snapshot
Assembly: Akka.Persistence.dll
Syntax
public class LocalSnapshotStore : SnapshotStore, IInternalActor
Remarks
This is the default akka.peristence.snapshot-store implementation, when no others are
explicitly set via HOCON configuration.
Constructors
| Edit this page View SourceLocalSnapshotStore()
Creates a new LocalSnapshotStore instance.
Declaration
public LocalSnapshotStore()
Methods
| Edit this page View SourceDeleteAsync(SnapshotMetadata, CancellationToken)
Plugin API: Deletes the snapshot identified by metadata.
This call is protected with a circuit-breaker
Declaration
protected override Task DeleteAsync(SnapshotMetadata metadata, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| SnapshotMetadata | metadata | Snapshot metadata. |
| CancellationToken | cancellationToken | CancellationToken used to signal cancelled snapshot operation |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
| Edit this page View SourceDeleteAsync(string, SnapshotSelectionCriteria, CancellationToken)
Plugin API: Deletes all snapshots matching provided criteria.
This call is protected with a circuit-breaker
Declaration
protected override Task DeleteAsync(string persistenceId, SnapshotSelectionCriteria criteria, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | persistenceId | Id of the persistent actor. |
| SnapshotSelectionCriteria | criteria | Selection criteria for deleting. |
| CancellationToken | cancellationToken | CancellationToken used to signal cancelled snapshot operation |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
| Edit this page View SourceGetSnapshotFileForWrite(SnapshotMetadata, string)
Declaration
protected FileInfo GetSnapshotFileForWrite(SnapshotMetadata metadata, string extension = "")
Parameters
| Type | Name | Description |
|---|---|---|
| SnapshotMetadata | metadata | |
| string | extension |
Returns
| Type | Description |
|---|---|
| FileInfo |
LoadAsync(string, SnapshotSelectionCriteria, CancellationToken)
Plugin API: Asynchronously loads a snapshot.
This call is protected with a circuit-breaker
Declaration
protected override Task<SelectedSnapshot> LoadAsync(string persistenceId, SnapshotSelectionCriteria criteria, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | persistenceId | Id of the persistent actor. |
| SnapshotSelectionCriteria | criteria | Selection criteria for loading. |
| CancellationToken | cancellationToken | CancellationToken used to signal cancelled snapshot operation |
Returns
| Type | Description |
|---|---|
| Task<SelectedSnapshot> |
Overrides
| Edit this page View SourcePreStart()
TBD
Declaration
protected override void PreStart()
Overrides
| Edit this page View SourceReceivePluginInternal(object)
Plugin API: Allows plugin implementers to use f.PipeTo(Self) and handle additional messages for implementing advanced features
Declaration
protected override bool ReceivePluginInternal(object message)
Parameters
| Type | Name | Description |
|---|---|---|
| object | message | TBD |
Returns
| Type | Description |
|---|---|
| bool | TBD |
Overrides
| Edit this page View SourceSave(SnapshotMetadata, object)
TBD
Declaration
protected virtual void Save(SnapshotMetadata metadata, object snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| SnapshotMetadata | metadata | TBD |
| object | snapshot | TBD |
SaveAsync(SnapshotMetadata, object, CancellationToken)
Plugin API: Asynchronously saves a snapshot.
This call is protected with a circuit-breaker
Declaration
protected override Task SaveAsync(SnapshotMetadata metadata, object snapshot, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| SnapshotMetadata | metadata | Snapshot metadata. |
| object | snapshot | Snapshot. |
| CancellationToken | cancellationToken | CancellationToken used to signal cancelled snapshot operation |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
| Edit this page View SourceSerialize(Stream, Snapshot)
TBD
Declaration
protected void Serialize(Stream stream, Snapshot snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | TBD |
| Snapshot | snapshot | TBD |
WithOutputStream(SnapshotMetadata, Action<Stream>)
TBD
Declaration
protected FileInfo WithOutputStream(SnapshotMetadata metadata, Action<Stream> p)
Parameters
| Type | Name | Description |
|---|---|---|
| SnapshotMetadata | metadata | TBD |
| Action<Stream> | p | TBD |
Returns
| Type | Description |
|---|---|
| FileInfo | TBD |
Edit this page