com.lightbend.lagom.internal.javadsl.persistence
A stream of the persistent events that have the given aggregateTag
, e.g.
A stream of the persistent events that have the given aggregateTag
, e.g.
all persistent events of all Order
entities.
The type of the offset is journal dependent, some journals use time-based
UUID offsets, while others use sequence numbers. The passed in fromOffset
must either be Offset#NONE, or an offset that has previously been produced
by this journal.
The stream will begin with events starting after fromOffset
.
To resume an event stream, store the Offset
corresponding to the most
recently processed Event
, and pass that back as the value for
fromOffset
to start the stream from events following that one.
IllegalArgumentException
If the fromOffset
type is not supported
by this journal.
Converts a stored event journal offset into the argument to an
eventsByTag
query.
Converts a stored event journal offset into the argument to an
eventsByTag
query.
Different Akka Persistence back ends interpret the offset
parameter to
eventsByTag
differently. Some return events starting after the given
offset
, others start with the event at that offset. In Lagom, we
shield end users from this difference, and always want to return
unprocessed events. Subclasses can override this method as necessary to
convert a stored offset into a starting offset that ensures no stored
values will be repeated in the stream.
the most recently seen offset
an offset that can be provided to the eventsByTag
query to
retrieve only unseen events
Retrieve a PersistentEntityRef for a given PersistentEntity class and identifier.
Retrieve a PersistentEntityRef for a given PersistentEntity class
and identifier. Commands are sent to a PersistentEntity
using a PersistentEntityRef
.
At system startup all PersistentEntity classes must be registered with this method.
At system startup all PersistentEntity classes must be registered with this method.
A stream of the persistent events that have the given aggregateTag
, e.g.
A stream of the persistent events that have the given aggregateTag
, e.g.
all persistent events of all Order
entities.
This method will only work with journals that support UUID offsets. Journals that produce sequence offsets will fail during stream handling.
(Since version 1.2.0) Use eventStream(AggregateEventTag, Offset) instead
No-op method that exists only for backward-compatibility reasons.
No-op method that exists only for backward-compatibility reasons. Lagom now uses Akka's CoordinatedShutdown to gracefully shut down all sharded entities, including Persistent Entities.
a completed CompletionStage
As of Lagom 1.4, this method has no effect and no longer needs to be called
Provides shared functionality for implementing a persistent entity registry.
Akka persistence plugins can extend this to implement a custom registry.