Property | Type | Description | |
---|---|---|---|
Extension | PersistenceExtension |
Method | Description | |
---|---|---|
DeleteSnapshot ( long sequenceNr ) : void |
Deletes the snapshot identified by sequenceNr. The PersistentActor will be notified about the status of the deletion via an DeleteSnapshotSuccess or DeleteSnapshotFailure message.
|
|
DeleteSnapshots ( SnapshotSelectionCriteria criteria ) : void |
Deletes all snapshots matching criteria. The PersistentActor will be notified about the status of the deletion via an DeleteSnapshotsSuccess or DeleteSnapshotsFailure message.
|
|
LoadSnapshot ( string persistenceId, SnapshotSelectionCriteria criteria, long toSequenceNr ) : void |
Instructs the snapshot store to load the specified snapshot and send it via an SnapshotOffer to the running PersistentActor.
|
|
SaveSnapshot ( object snapshot ) : void |
Saves snapshot of current ISnapshotter state. The PersistentActor will be notified about the success or failure of this via an SaveSnapshotSuccess or SaveSnapshotFailure message.
|
Method | Description | |
---|---|---|
OnReplayError ( |
Called whenever a message replay fails. By default it logs the error. Subclass may override to customize logging. The PersistentView will not stop or throw exception due to this. It will try again on next update.
|
|
PersistentView ( ) : System |
Method | Description | |
---|---|---|
ChangeState ( |
||
ChangeStateToReplayStarted ( bool isAwait, long replayMax ) : void | ||
CreateStash ( ) : IStash | ||
Idle ( ) : |
When receiving an Update event, switches to ReplayStarted state and triggers an incremental message replay. For any other message invokes actor default behavior.
|
|
IgnoreRemainingReplay ( |
Consumes remaining replayed messages and then throws the exception.
|
|
OnReplayComplete ( ) : void |
Switches to Idle.
|
|
OnReplayFailureCompleted ( |
||
RecoveryStarted ( long replayMax ) : |
Processes a loaded snapshot, if any. A loaded snapshot is offered with a SnapshotOffer message to the actor's PersistentView.Receive method. Then initiates a message replay, either starting from the loaded snapshot or from scratch, and switches to ReplayStarted state. All incoming messages are stashed.
|
|
ReplayStarted ( bool shouldAwait ) : |
Processes replayed message, if any. The actor's PersistentView.Receive is invoked with the replayed events. If replay succeeds it got highest stored sequence number response from the journal and then switche it switches to Idle state. If replay succeeds the OnReplaySuccess callback method is called, otherwise OnReplayError is called and remaining replay events are consumed (ignored). All incoming messages are stashed when shouldAwait is true.
|
|
UpdateLastSequenceNr ( IPersistentRepresentation persistent ) : void |
public DeleteSnapshot ( long sequenceNr ) : void | ||
sequenceNr | long | |
return | void |
public DeleteSnapshots ( SnapshotSelectionCriteria criteria ) : void | ||
criteria | SnapshotSelectionCriteria | |
return | void |
public LoadSnapshot ( string persistenceId, SnapshotSelectionCriteria criteria, long toSequenceNr ) : void | ||
persistenceId | string | |
criteria | SnapshotSelectionCriteria | |
toSequenceNr | long | |
return | void |
protected OnReplayError ( |
||
cause | ||
return | void |
public SaveSnapshot ( object snapshot ) : void | ||
snapshot | object | |
return | void |