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
|
|
@ -120,7 +120,7 @@ tag - for example if the journal stored the events as json it may try to find th
|
|||
|
||||
.. includecode:: code/docs/persistence/query/PersistenceQueryDocSpec.scala#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-scala` 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
|
||||
|
|
@ -130,8 +130,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-scala`,
|
||||
which are a feature of :ref:`streams-scala` 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
|
||||
|
|
@ -144,8 +144,6 @@ specialised query object, as demonstrated in the sample below:
|
|||
|
||||
.. includecode:: code/docs/persistence/query/PersistenceQueryDocSpec.scala#advanced-journal-query-usage
|
||||
|
||||
.. _materialized values: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-quickstart.html#Materialized_values
|
||||
.. _Akka Streams: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala.html
|
||||
.. _Community plugins: http://akka.io/community/#plugins-to-akka-persistence-query
|
||||
|
||||
Performance and denormalization
|
||||
|
|
|
|||
|
|
@ -731,13 +731,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::
|
||||
|
||||
``PersistentFSM`` 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 ``PersistentFSM``.
|
||||
|
||||
A Simple Example
|
||||
----------------
|
||||
To demonstrate the features of the ``PersistentFSM`` trait, consider an actor which represents a Web store customer.
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ only make sense in streaming and vice versa):
|
|||
Finally in order to :ref:`materialize <stream-materialization-scala>` and run the stream computation we need to attach
|
||||
the Flow to a :class:`Sink` that will get the Flow running. The simplest way to do this is to call
|
||||
``runWith(sink)`` on a ``Source``. For convenience a number of common Sinks are predefined and collected as methods on
|
||||
the :class:`Sink` `companion object <http://doc.akka.io/api/akka-stream-and-http-experimental/@version@/#akka.stream.scaladsl.Sink$>`_.
|
||||
the :class:`Sink` companion object.
|
||||
For now let's simply print each author:
|
||||
|
||||
.. includecode:: ../code/docs/stream/TwitterStreamQuickstartDocSpec.scala#authors-foreachsink-println
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue