!per #17518 harmonize and document failure handling in persistence

+ added tests for all failure scenarios (callbacks)
This commit is contained in:
Konrad Malawski 2015-07-02 00:44:10 +02:00
parent 403369a29e
commit 874d07c0ae
22 changed files with 390 additions and 135 deletions

View file

@ -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 {