+per #3661 Event sourcing support

This commit is contained in:
Martin Krasser 2013-10-15 09:01:07 +02:00
parent a30ca0d3d4
commit 0a2cfdc4d1
13 changed files with 948 additions and 71 deletions

View file

@ -51,6 +51,8 @@ public class SnapshotExample {
} else if (message.equals("print")) {
System.out.println("current state = " + state);
} else if (message.equals("snap")) {
// IMPORTANT: create a copy of snapshot
// because ExampleState is mutable !!!
saveSnapshot(state.copy());
}
}