!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
|
|
@ -258,6 +258,16 @@ public class LambdaPersistenceDocTest {
|
|||
static Object o5 = new Object() {
|
||||
|
||||
class MyPersistentActor extends AbstractPersistentActor {
|
||||
|
||||
//#snapshot-criteria
|
||||
@Override
|
||||
public Recovery recovery() {
|
||||
return Recovery.create(
|
||||
SnapshotSelectionCriteria
|
||||
.create(457L, System.currentTimeMillis()));
|
||||
}
|
||||
//#snapshot-criteria
|
||||
|
||||
//#snapshot-offer
|
||||
private Object state;
|
||||
|
||||
|
|
@ -291,14 +301,6 @@ public class LambdaPersistenceDocTest {
|
|||
match(Object.class, o -> {/* ... */}).build()
|
||||
);
|
||||
}
|
||||
|
||||
private void recover() {
|
||||
//#snapshot-criteria
|
||||
persistentActor.tell(Recovery.create(
|
||||
SnapshotSelectionCriteria
|
||||
.create(457L, System.currentTimeMillis())), null);
|
||||
//#snapshot-criteria
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue