org.apache.pekko.persistence.jdbc.query.javadsl
JdbcReadJournal
Companion object JdbcReadJournal
class JdbcReadJournal extends ReadJournal with CurrentPersistenceIdsQuery with PersistenceIdsQuery with CurrentEventsByPersistenceIdQuery with EventsByPersistenceIdQuery with CurrentEventsByTagQuery with EventsByTagQuery
- Source
- JdbcReadJournal.scala
- Alphabetic
- By Inheritance
- JdbcReadJournal
- EventsByTagQuery
- CurrentEventsByTagQuery
- EventsByPersistenceIdQuery
- CurrentEventsByPersistenceIdQuery
- PersistenceIdsQuery
- CurrentPersistenceIdsQuery
- ReadJournal
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new JdbcReadJournal(journal: scaladsl.JdbcReadJournal)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
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()
-
def
currentEventsByPersistenceId(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long): Source[EventEnvelope, NotUsed]
Same type of query as
eventsByPersistenceIdbut the event stream is completed immediately when it reaches the end of the "result set".Same type of query as
eventsByPersistenceIdbut 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
- JdbcReadJournal → CurrentEventsByPersistenceIdQuery
-
def
currentEventsByTag(tag: String, offset: Offset): Source[EventEnvelope, NotUsed]
Same type of query as
eventsByTagbut the event stream is completed immediately when it reaches the end of the "result set".Same type of query as
eventsByTagbut 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
- JdbcReadJournal → CurrentEventsByTagQuery
-
def
currentPersistenceIds(): Source[String, NotUsed]
Same type of query as
persistenceIdsbut the event stream is completed immediately when it reaches the end of the "result set".Same type of query as
persistenceIdsbut 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
- JdbcReadJournal → CurrentPersistenceIdsQuery
-
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 to retrieve a stream of events for a particular persistenceId.eventsByPersistenceIdis used to retrieve a stream of events for a particular persistenceId.The
EventEnvelopecontains the event and providespersistenceIdandsequenceNrfor each event. ThesequenceNris the sequence number for the persistent actor with thepersistenceIdthat persisted the event. ThepersistenceId+sequenceNris an unique identifier for the event.fromSequenceNrandtoSequenceNrcan be specified to limit the set of returned events. ThefromSequenceNrandtoSequenceNrare inclusive.The
EventEnvelopealso provides theoffsetthat corresponds to theorderingcolumn in the Journal table. Theorderingis a sequential id number that uniquely identifies the position of each event, also across differentpersistenceId. TheOffsettype isorg.apache.pekko.persistence.query.Sequencewith theorderingas the offset value. This is the sameorderingnumber as is used in the offset of theeventsByTagquery.The returned event stream is ordered by
sequenceNr.Causality is guaranteed (
sequenceNrs of events for a particularpersistenceIdare always ordered in a sequence monotonically increasing by one). Multiple executions of the same bounded stream are guaranteed to emit exactly the same stream of events.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.- Definition Classes
- JdbcReadJournal → EventsByPersistenceIdQuery
-
def
eventsByTag(tag: String, offset: Offset): Source[EventEnvelope, NotUsed]
Query events that have a specific tag.
Query events that have a specific tag.
The consumer can keep track of its current position in the event stream by storing the
offsetand restart the query from a givenoffsetafter a crash/restart. The offset is exclusive, i.e. the event corresponding to the givenoffsetparameter is not included in the stream.For pekko-persistence-jdbc the
offsetcorresponds to theorderingcolumn in the Journal table. Theorderingis a sequential id number that uniquely identifies the position of each event within the event stream. TheOffsettype isorg.apache.pekko.persistence.query.Sequencewith theorderingas the offset value.The returned event stream is ordered by
offset.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 CurrentEventsByTagQuery#currentEventsByTag.
- Definition Classes
- JdbcReadJournal → EventsByTagQuery
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
persistenceIds(): Source[String, NotUsed]
persistenceIdsis used to retrieve a stream of allpersistenceIds as strings.persistenceIdsis used to retrieve a stream of allpersistenceIds as strings.The stream guarantees that a
persistenceIdis only emitted once and there are no duplicates. Order is not defined. Multiple executions of the same stream (even bounded) may emit different sequence ofpersistenceIds.The stream is not completed when it reaches the end of the currently known
persistenceIds, but it continues to push newpersistenceIds when new events are persisted. Corresponding query that is completed when it reaches the end of the currently knownpersistenceIds is provided bycurrentPersistenceIds.- Definition Classes
- JdbcReadJournal → PersistenceIdsQuery
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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()