+per #13944 Send RecoveryComplete message at end of recovery

Fixes #13944

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	project/AkkaBuild.scala
This commit is contained in:
Björn Antonsson 2014-06-05 14:07:17 +02:00
parent 3c9483520a
commit 9bcaeff87d
14 changed files with 223 additions and 81 deletions

View file

@ -19,6 +19,8 @@ import static java.util.Arrays.asList;
public class LambdaPersistenceDocTest {
public interface SomeOtherMessage {}
public interface ProcessorMethods {
//#processor-id
public String processorId();
@ -50,7 +52,7 @@ public class LambdaPersistenceDocTest {
Throwable cause = failure.cause();
// ...
}).
matchAny(otherwise -> {
match(SomeOtherMessage.class, message -> {
// message not written to journal
}).build()
);
@ -136,28 +138,14 @@ public class LambdaPersistenceDocTest {
public MyProcessor5() {
receive(ReceiveBuilder.
matchEquals("FIRST", s -> {
match(RecoveryCompleted.class, r -> {
recoveryCompleted();
getContext().become(active);
unstashAll();
}).
matchAny(message -> {
if (recoveryFinished()) {
stash();
} else {
active.apply(message);
}
}).
build()
);
}
@Override
public void preStart() throws Exception {
super.preStart();
self().tell("FIRST", self());
}
private void recoveryCompleted() {
// perform init after recovery, before any other messages
// ...