org.apache.pekko.persistence.query.journal.leveldb.javadsl
LeveldbReadJournal
Companion object LeveldbReadJournal
class LeveldbReadJournal extends ReadJournal with PersistenceIdsQuery with CurrentPersistenceIdsQuery with EventsByPersistenceIdQuery with CurrentEventsByPersistenceIdQuery with EventsByTagQuery with CurrentEventsByTagQuery
Java API: pekko.persistence.query.javadsl.ReadJournal implementation for LevelDB.
It is retrieved with:
LeveldbReadJournal queries =
PersistenceQuery.get(system).getReadJournalFor(LeveldbReadJournal.class, LeveldbReadJournal.Identifier());Corresponding Scala API is in pekko.persistence.query.journal.leveldb.scaladsl.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 LeveldbReadJournal#Identifier. See reference.conf.
- Annotations
- @deprecated
- Deprecated
(Since version Akka 2.6.15) Use another journal implementation
- Source
- LeveldbReadJournal.scala
- Alphabetic
- By Inheritance
- LeveldbReadJournal
- CurrentEventsByTagQuery
- EventsByTagQuery
- CurrentEventsByPersistenceIdQuery
- EventsByPersistenceIdQuery
- CurrentPersistenceIdsQuery
- PersistenceIdsQuery
- ReadJournal
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new LeveldbReadJournal(scaladslReadJournal: scaladsl.LeveldbReadJournal)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from LeveldbReadJournal to any2stringadd[LeveldbReadJournal] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (LeveldbReadJournal, B)
- Implicit
- This member is added by an implicit conversion from LeveldbReadJournal to ArrowAssoc[LeveldbReadJournal] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
currentEventsByPersistenceId(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long): Source[EventEnvelope, NotUsed]
Same type of query as #eventsByPersistenceId but the event stream is completed immediately when it reaches the end of the "result set".
Same type of query as #eventsByPersistenceId 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.
- Definition Classes
- LeveldbReadJournal → CurrentEventsByPersistenceIdQuery
-
def
currentEventsByTag(tag: String, offset: Offset): Source[EventEnvelope, NotUsed]
Same type of query as #eventsByTag but the event stream is completed immediately when it reaches the end of the "result set".
Same type of query as #eventsByTag 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.
- Definition Classes
- LeveldbReadJournal → CurrentEventsByTagQuery
-
def
currentPersistenceIds(): Source[String, NotUsed]
Same type of query as #persistenceIds but the stream is completed immediately when it reaches the end of the "result set".
Same type of query as #persistenceIds 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.
- Definition Classes
- LeveldbReadJournal → CurrentPersistenceIdsQuery
-
def
ensuring(cond: (LeveldbReadJournal) ⇒ Boolean, msg: ⇒ Any): LeveldbReadJournal
- Implicit
- This member is added by an implicit conversion from LeveldbReadJournal to Ensuring[LeveldbReadJournal] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (LeveldbReadJournal) ⇒ Boolean): LeveldbReadJournal
- Implicit
- This member is added by an implicit conversion from LeveldbReadJournal to Ensuring[LeveldbReadJournal] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): LeveldbReadJournal
- Implicit
- This member is added by an implicit conversion from LeveldbReadJournal to Ensuring[LeveldbReadJournal] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): LeveldbReadJournal
- Implicit
- This member is added by an implicit conversion from LeveldbReadJournal to Ensuring[LeveldbReadJournal] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
eventsByPersistenceId(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long): Source[EventEnvelope, NotUsed]
eventsByPersistenceIdis used for retrieving events for a specificPersistentActoridentified bypersistenceId.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 the pekko.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.
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.
- Definition Classes
- LeveldbReadJournal → EventsByPersistenceIdQuery
-
def
eventsByTag(tag: String, offset: Offset): Source[EventEnvelope, NotUsed]
eventsByTagis used for retrieving events that were marked with a given tag, e.g.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.EventAdapter that wraps the events in a pekko.persistence.journal.Tagged with the given
tags.You can retrieve a subset of all events by specifying
offset, or use0Lto retrieve all events with a given tag. Theoffsetcorresponds to an ordered sequence number for the specific tag. Note that the corresponding offset of each event is provided in the pekko.persistence.query.EventEnvelope, which makes it possible to resume the stream at a later point from a given offset.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
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.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.
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.
- Definition Classes
- LeveldbReadJournal → EventsByTagQuery
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
persistenceIds(): Source[String, NotUsed]
persistenceIdsis used for retrieving allpersistenceIdsof all persistent actors.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 by #currentPersistenceIds.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.
- Definition Classes
- LeveldbReadJournal → PersistenceIdsQuery
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (LeveldbReadJournal, B)
- Implicit
- This member is added by an implicit conversion from LeveldbReadJournal to ArrowAssoc[LeveldbReadJournal] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from LeveldbReadJournal to StringFormat[LeveldbReadJournal] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)instead ofvalue.formatted(formatString), or use thef""string interpolator. In Java 15 and later,formattedresolves to the new method in String which has reversed parameters.