=per #3774 Persistence activator templates
This commit is contained in:
parent
1e86e6436b
commit
cf6e61e45a
31 changed files with 518 additions and 76 deletions
|
|
@ -439,7 +439,7 @@ event sourcing as a pattern on top of command sourcing). A processor that extend
|
|||
``UntypedEventsourcedProcessor`` is defined by implementing ``onReceiveRecover`` and ``onReceiveCommand``. This is
|
||||
demonstrated in the following example.
|
||||
|
||||
.. includecode:: ../../../akka-samples/akka-sample-persistence/src/main/java/sample/persistence/japi/EventsourcedExample.java#eventsourced-example
|
||||
.. includecode:: ../../../akka-samples/akka-sample-persistence-java/src/main/java/sample/persistence/EventsourcedExample.java#eventsourced-example
|
||||
|
||||
The example defines two data types, ``Cmd`` and ``Evt`` to represent commands and events, respectively. The
|
||||
``state`` of the ``ExampleProcessor`` is a list of persisted event data contained in ``ExampleState``.
|
||||
|
|
@ -463,6 +463,10 @@ the ``persist`` call and the execution(s) of the associated event handler. This
|
|||
calls in context of a single command. The example also shows how to switch between command different command handlers
|
||||
with ``getContext().become()`` and ``getContext().unbecome()``.
|
||||
|
||||
The easiest way to run this example yourself is to download `Typesafe Activator <http://typesafe.com/platform/getstarted>`_
|
||||
and open the tutorial named `Akka Persistence Samples with Java <http://typesafe.com/activator/template/akka-sample-persistence-java>`_.
|
||||
It contains instructions on how to run the ``EventsourcedExample``.
|
||||
|
||||
Reliable event delivery
|
||||
-----------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue