per #15423 Remove deprecated features from akka-persistence

* remove channels
* remove View
* remove Processor
* collapse the complicated internal state management
  that was spread out between Processor, Eventsourced and Recovery
* remove Recovery trait, this caused some duplication between Eventsourced
  and PersistentView, but but the enhanced PersistentView will not be based
  on recovery infrastructure, and therefore PersistentView code will be replaced anyway
* remove PersistentBatch
* remove LoopMessage
* remove deleteMessages of individual messages
* remove Persistent, PersistentRepr and PersistentImpl are kept
* remove processorId
* update doc sample code
* note in migration guide about persistenceId
* rename Resequencable to PersistentEnvelope
This commit is contained in:
Patrik Nordwall 2014-12-08 11:02:14 +01:00
parent 86a5b3d9d7
commit c566d5a106
84 changed files with 2162 additions and 9560 deletions

View file

@ -21,6 +21,7 @@ import java.util.ArrayList;
import static java.util.Arrays.asList;
class Cmd implements Serializable {
private static final long serialVersionUID = 1L;
private final String data;
public Cmd(String data) {
@ -33,6 +34,7 @@ class Cmd implements Serializable {
}
class Evt implements Serializable {
private static final long serialVersionUID = 1L;
private final String data;
public Evt(String data) {
@ -45,6 +47,7 @@ class Evt implements Serializable {
}
class ExampleState implements Serializable {
private static final long serialVersionUID = 1L;
private final ArrayList<String> events;
public ExampleState() {
@ -116,13 +119,13 @@ class ExamplePersistentActor extends AbstractPersistentActor {
public class PersistentActorExample {
public static void main(String... args) throws Exception {
final ActorSystem system = ActorSystem.create("example");
final ActorRef processor = system.actorOf(Props.create(ExamplePersistentActor.class), "processor-4-java8");
processor.tell(new Cmd("foo"), null);
processor.tell(new Cmd("baz"), null);
processor.tell(new Cmd("bar"), null);
processor.tell("snap", null);
processor.tell(new Cmd("buzz"), null);
processor.tell("print", null);
final ActorRef persistentActor = system.actorOf(Props.create(ExamplePersistentActor.class), "persistentActor-4-java8");
persistentActor.tell(new Cmd("foo"), null);
persistentActor.tell(new Cmd("baz"), null);
persistentActor.tell(new Cmd("bar"), null);
persistentActor.tell("snap", null);
persistentActor.tell(new Cmd("buzz"), null);
persistentActor.tell("print", null);
Thread.sleep(1000);
system.terminate();

View file

@ -72,6 +72,6 @@ public class PersistentActorFailureExample {
// etc ...
Thread.sleep(1000);
system.shutdown();
system.terminate();
}
}

View file

@ -18,6 +18,7 @@ import java.util.ArrayList;
public class SnapshotExample {
public static class ExampleState implements Serializable {
private static final long serialVersionUID = 1L;
private final ArrayList<String> received;
public ExampleState() {