!per #17518 harmonize and document failure handling in persistence
+ added tests for all failure scenarios (callbacks)
This commit is contained in:
parent
403369a29e
commit
874d07c0ae
22 changed files with 390 additions and 135 deletions
|
|
@ -166,6 +166,12 @@ object PersistenceDocSpec {
|
|||
class MyPersistentActor extends PersistentActor {
|
||||
override def persistenceId = "my-stable-persistence-id"
|
||||
|
||||
//#snapshot-criteria
|
||||
override def recovery = Recovery(fromSnapshot = SnapshotSelectionCriteria(
|
||||
maxSequenceNr = 457L,
|
||||
maxTimestamp = System.currentTimeMillis))
|
||||
//#snapshot-criteria
|
||||
|
||||
//#snapshot-offer
|
||||
var state: Any = _
|
||||
|
||||
|
|
@ -179,11 +185,6 @@ object PersistenceDocSpec {
|
|||
override def receiveCommand: Receive = ???
|
||||
}
|
||||
|
||||
//#snapshot-criteria
|
||||
persistentActor ! Recovery(fromSnapshot = SnapshotSelectionCriteria(
|
||||
maxSequenceNr = 457L,
|
||||
maxTimestamp = System.currentTimeMillis))
|
||||
//#snapshot-criteria
|
||||
}
|
||||
|
||||
object PersistAsync {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue