+per #3661 Event sourcing support
This commit is contained in:
parent
a30ca0d3d4
commit
0a2cfdc4d1
13 changed files with 948 additions and 71 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue