Merge pull request #22200 from akka/wip-21190-promote-PersistenceFSM-patriknw
Promote PersistenceFSM, #21190
This commit is contained in:
commit
554d119446
11 changed files with 8 additions and 42 deletions
|
|
@ -21,13 +21,6 @@ These relations are interpreted as meaning:
|
|||
*If we are in state S and the event E occurs, we should perform the actions A
|
||||
and make a transition to the state S'.*
|
||||
|
||||
.. warning::
|
||||
|
||||
The Java with lambda support part of Akka is marked as **“experimental”** as of its introduction in
|
||||
Akka 2.3.0. We will continue to improve this API based on our users’ feedback, which implies that
|
||||
while we try to keep incompatible changes to a minimum, but the binary compatibility guarantee for
|
||||
maintenance releases does not apply to the :class:`akka.actor.AbstractFSM`, related classes and the
|
||||
:class:`akka.japi.pf` package.
|
||||
|
||||
A Simple Example
|
||||
================
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ tag - for example if the journal stored the events as json it may try to find th
|
|||
|
||||
.. includecode:: code/docs/persistence/PersistenceQueryDocTest.java#events-by-tag
|
||||
|
||||
As you can see, we can use all the usual stream combinators available from `Akka Streams`_ on the resulting query stream,
|
||||
As you can see, we can use all the usual stream combinators available from :ref:`streams-java` on the resulting query stream,
|
||||
including for example taking the first 10 and cancelling the stream. It is worth pointing out that the built-in ``EventsByTag``
|
||||
query has an optionally supported offset parameter (of type ``Long``) which the journals can use to implement resumable-streams.
|
||||
For example a journal may be able to use a WHERE clause to begin the read starting from a specific row, or in a datastore
|
||||
|
|
@ -134,8 +134,8 @@ If your usage does not require a live stream, you can use the ``currentEventsByT
|
|||
|
||||
Materialized values of queries
|
||||
------------------------------
|
||||
Journals are able to provide additional information related to a query by exposing `materialized values`_,
|
||||
which are a feature of `Akka Streams`_ that allows to expose additional values at stream materialization time.
|
||||
Journals are able to provide additional information related to a query by exposing :ref:`materialized-values-quick-java`,
|
||||
which are a feature of :ref:`streams-java` that allows to expose additional values at stream materialization time.
|
||||
|
||||
More advanced query journals may use this technique to expose information about the character of the materialized
|
||||
stream, for example if it's finite or infinite, strictly ordered or not ordered at all. The materialized value type
|
||||
|
|
@ -148,8 +148,6 @@ specialised query object, as demonstrated in the sample below:
|
|||
|
||||
.. includecode:: code/docs/persistence/PersistenceQueryDocTest.java#advanced-journal-query-usage
|
||||
|
||||
.. _materialized values: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/java/stream-quickstart.html#Materialized_values
|
||||
.. _Akka Streams: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/java.html
|
||||
.. _Community plugins: http://akka.io/community/#plugins-to-akka-persistence-query
|
||||
|
||||
Performance and denormalization
|
||||
|
|
|
|||
|
|
@ -716,13 +716,6 @@ Persistent FSM
|
|||
Its internal state is persisted as a sequence of changes, later referred to as domain events.
|
||||
Relationship between incoming messages, FSM's states and transitions, persistence of domain events is defined by a DSL.
|
||||
|
||||
.. warning::
|
||||
|
||||
``AbstractPersistentFSM`` is marked as **“experimental”** as of its introduction in Akka 2.4.0. We will continue to
|
||||
improve this API based on our users’ feedback, which implies that while we try to keep incompatible
|
||||
changes to a minimum the binary compatibility guarantee for maintenance releases does not apply to the
|
||||
contents of the `classes related to ``AbstractPersistentFSM``.
|
||||
|
||||
A Simple Example
|
||||
----------------
|
||||
To demonstrate the features of the ``AbstractPersistentFSM``, consider an actor which represents a Web store customer.
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ only make sense in streaming and vice versa):
|
|||
Finally in order to :ref:`materialize <stream-materialization-java>` and run the stream computation we need to attach
|
||||
the Flow to a ``Sink<T, M>`` that will get the Flow running. The simplest way to do this is to call
|
||||
``runWith(sink)`` on a ``Source<Out, M>``. For convenience a number of common Sinks are predefined and collected as static methods on
|
||||
the `Sink class <http://doc.akka.io/japi/akka-stream-and-http-experimental/@version@/akka/stream/javadsl/Sink.html>`_.
|
||||
the ``Sink class``.
|
||||
For now let's simply print each author:
|
||||
|
||||
.. includecode:: ../code/docs/stream/TwitterStreamQuickstartDocTest.java#authors-foreachsink-println
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue