Package akka.persistence.query.javadsl
Interface ReadJournal
-
- All Known Subinterfaces:
CurrentEventsByPersistenceIdQuery
,CurrentEventsByPersistenceIdStartingFromSnapshotQuery
,CurrentEventsByPersistenceIdTypedQuery
,CurrentEventsBySliceQuery
,CurrentEventsBySliceStartingFromSnapshotsQuery
,CurrentEventsByTagQuery
,CurrentPersistenceIdsQuery
,EventsByPersistenceIdQuery
,EventsByPersistenceIdStartingFromSnapshotQuery
,EventsByPersistenceIdTypedQuery
,EventsBySliceQuery
,EventsBySliceStartingFromSnapshotsQuery
,EventsByTagQuery
,EventTimestampQuery
,LoadEventQuery
,PagedPersistenceIdsQuery
,PersistenceIdsQuery
- All Known Implementing Classes:
EventsBySliceFirehoseQuery
,LeveldbReadJournal
,PersistenceTestKitDurableStateStore
,PersistenceTestKitReadJournal
public interface ReadJournal
API for reading persistent events and information derived from stored persistent events.The purpose of the API is not to enforce compatibility between different journal implementations, because the technical capabilities may be very different. The interface is very open so that different journals may implement specific queries.
There are a few pre-defined queries that a query implementation may implement, such as
EventsByPersistenceIdQuery
,PersistenceIdsQuery
andEventsByTagQuery
Implementation of these queries are optional and query (journal) plugins may define their own specialized queries by implementing other methods.Usage:
SomeCoolReadJournal journal = PersistenceQuery.get(system).getReadJournalFor(SomeCoolReadJournal.class, queryPluginConfigPath); Source<EventEnvolope, Unit> events = journal.eventsByTag("mytag", 0L);
For Scala API see
ReadJournal
.