Class LeveldbReadJournal
- All Implemented Interfaces:
- CurrentEventsByPersistenceIdQuery,- CurrentEventsByTagQuery,- CurrentPersistenceIdsQuery,- EventsByPersistenceIdQuery,- EventsByTagQuery,- PersistenceIdsQuery,- ReadJournal
pekko.persistence.query.scaladsl.ReadJournal implementation for LevelDB.
 It is retrieved with:
 val queries = PersistenceQuery(system).readJournalFor[LeveldbReadJournal](LeveldbReadJournal.Identifier)
 
 Corresponding Java API is in pekko.persistence.query.journal.leveldb.javadsl.LeveldbReadJournal.
 
 Configuration settings can be defined in the configuration section with the
 absolute path corresponding to the identifier, which is "pekko.persistence.query.journal.leveldb"
 for the default Identifier(). See reference.conf.
- 
Constructor SummaryConstructorsConstructorDescriptionLeveldbReadJournal(ExtendedActorSystem system, com.typesafe.config.Config config) Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptioncurrentEventsByPersistenceId(String persistenceId, long fromSequenceNr, long toSequenceNr) Deprecated.Same type of query aseventsByPersistenceId(java.lang.String, long, long)but the event stream is completed immediately when it reaches the end of the "result set".longDeprecated.longDeprecated.currentEventsByTag(String tag, Offset offset) Deprecated.Same type of query aseventsByTag(java.lang.String, org.apache.pekko.persistence.query.Offset)but the event stream is completed immediately when it reaches the end of the "result set".Deprecated.Deprecated.Same type of query aspersistenceIds()but the stream is completed immediately when it reaches the end of the "result set".eventsByPersistenceId(String persistenceId, long fromSequenceNr, long toSequenceNr) Deprecated.eventsByPersistenceIdis used for retrieving events for a specificPersistentActoridentified bypersistenceId.longDeprecated.longDeprecated.eventsByTag(String tag, Offset offset) Deprecated.eventsByTagis used for retrieving events that were marked with a given tag, e.g.Deprecated.static final StringDeprecated.The default identifier forLeveldbReadJournalto be used withpekko.persistence.query.PersistenceQuery#readJournalFor.Deprecated.persistenceIdsis used for retrieving allpersistenceIdsof all persistent actors.
- 
Constructor Details- 
LeveldbReadJournalDeprecated.
 
- 
- 
Method Details- 
IdentifierDeprecated.The default identifier forLeveldbReadJournalto be used withpekko.persistence.query.PersistenceQuery#readJournalFor.The value is "pekko.persistence.query.journal.leveldb"and corresponds to the absolute path to the read journal configuration entry.
- 
persistenceIdsDeprecated.persistenceIdsis used for retrieving allpersistenceIdsof all persistent actors.The returned event stream is unordered and you can expect different order for multiple executions of the query. The stream is not completed when it reaches the end of the currently used persistenceIds, but it continues to push newpersistenceIdswhen new persistent actors are created. Corresponding query that is completed when it reaches the end of the currently currently usedpersistenceIdsis provided bycurrentPersistenceIds().The LevelDB write journal is notifying the query side as soon as new persistenceIdsare created and there is no periodic polling or batching involved in this query.The stream is completed with failure if there is a failure in executing the query in the backend journal. - Specified by:
- persistenceIdsin interface- PersistenceIdsQuery
 
- 
currentPersistenceIdsDeprecated.Same type of query aspersistenceIds()but the stream is completed immediately when it reaches the end of the "result set". Persistent actors that are created after the query is completed are not included in the stream.- Specified by:
- currentPersistenceIdsin interface- CurrentPersistenceIdsQuery
 
- 
eventsByPersistenceIdpublic Source<EventEnvelope,NotUsed> eventsByPersistenceId(String persistenceId, long fromSequenceNr, long toSequenceNr) Deprecated.eventsByPersistenceIdis used for retrieving events for a specificPersistentActoridentified bypersistenceId.You can retrieve a subset of all events by specifying fromSequenceNrandtoSequenceNror use0LandLong.MaxValuerespectively to retrieve all events. Note that the corresponding sequence number of each event is provided in thepekko.persistence.query.EventEnvelope, which makes it possible to resume the stream at a later point from a given sequence number.The returned event stream is ordered by sequence number, i.e. the same order as the PersistentActorpersisted the events. The same prefix of stream elements (in same order) are returned for multiple executions of the query, except for when events have been deleted.The stream is not completed when it reaches the end of the currently stored events, but it continues to push new events when new events are persisted. Corresponding query that is completed when it reaches the end of the currently stored events is provided by currentEventsByPersistenceId(java.lang.String, long, long).The LevelDB write journal is notifying the query side as soon as events are persisted, but for efficiency reasons the query side retrieves the events in batches that sometimes can be delayed up to the configured refresh-interval.The stream is completed with failure if there is a failure in executing the query in the backend journal. - Specified by:
- eventsByPersistenceIdin interface- EventsByPersistenceIdQuery
 
- 
eventsByPersistenceId$default$2public long eventsByPersistenceId$default$2()Deprecated.
- 
eventsByPersistenceId$default$3public long eventsByPersistenceId$default$3()Deprecated.
- 
currentEventsByPersistenceIdpublic Source<EventEnvelope,NotUsed> currentEventsByPersistenceId(String persistenceId, long fromSequenceNr, long toSequenceNr) Deprecated.Same type of query aseventsByPersistenceId(java.lang.String, long, long)but the event stream is completed immediately when it reaches the end of the "result set". Events that are stored after the query is completed are not included in the event stream.- Specified by:
- currentEventsByPersistenceIdin interface- CurrentEventsByPersistenceIdQuery
 
- 
currentEventsByPersistenceId$default$2public long currentEventsByPersistenceId$default$2()Deprecated.
- 
currentEventsByPersistenceId$default$3public long currentEventsByPersistenceId$default$3()Deprecated.
- 
eventsByTagDeprecated.eventsByTagis used for retrieving events that were marked with a given tag, e.g. all events of an Aggregate Root type.To tag events you create an pekko.persistence.journal.EventAdapterthat wraps the events in apekko.persistence.journal.Taggedwith the giventags.You can use NoOffsetto retrieve all events with a given tag or retrieve a subset of all events by specifying aSequenceoffset. Theoffsetcorresponds to an ordered sequence number for the specific tag. Note that the corresponding offset of each event is provided in thepekko.persistence.query.EventEnvelope, which makes it possible to resume the stream at a later point from a given offset.The offsetis exclusive, i.e. the event with the exact same sequence number will not be included in the returned stream. This means that you can use the offset that is returned inEventEnvelopeas theoffsetparameter in a subsequent query.In addition to the offsettheEventEnvelopealso providespersistenceIdandsequenceNrfor each event. ThesequenceNris the sequence number for the persistent actor with thepersistenceIdthat persisted the event. ThepersistenceId+sequenceNris an unique identifier for the event.The returned event stream is ordered by the offset (tag sequence number), which corresponds to the same order as the write journal stored the events. The same stream elements (in same order) are returned for multiple executions of the query. Deleted events are not deleted from the tagged event stream. The stream is not completed when it reaches the end of the currently stored events, but it continues to push new events when new events are persisted. Corresponding query that is completed when it reaches the end of the currently stored events is provided by currentEventsByTag(java.lang.String, org.apache.pekko.persistence.query.Offset).The LevelDB write journal is notifying the query side as soon as tagged events are persisted, but for efficiency reasons the query side retrieves the events in batches that sometimes can be delayed up to the configured refresh-interval.The stream is completed with failure if there is a failure in executing the query in the backend journal. - Specified by:
- eventsByTagin interface- EventsByTagQuery
 
- 
eventsByTag$default$2Deprecated.
- 
currentEventsByTagDeprecated.Same type of query aseventsByTag(java.lang.String, org.apache.pekko.persistence.query.Offset)but the event stream is completed immediately when it reaches the end of the "result set". Events that are stored after the query is completed are not included in the event stream.- Specified by:
- currentEventsByTagin interface- CurrentEventsByTagQuery
 
- 
currentEventsByTag$default$2Deprecated.
 
-