Interface ReadJournalProvider
- All Known Implementing Classes:
LeveldbReadJournalProvider,PersistenceTestKitReadJournalProvider
public interface ReadJournalProvider
A query plugin must implement a class that implements this trait.
It provides the concrete implementations for the Java and Scala APIs.
A read journal plugin must provide implementations for both
org.apache.pekko.persistence.query.scaladsl.ReadJournal and org.apache.pekko.persistence.query.javadsl.ReadJournal.
The plugin must implement both the scaladsl and the javadsl traits because the
org.apache.pekko.stream.scaladsl.Source and org.apache.pekko.stream.javadsl.Source are different types
and even though those types can easily be converted to each other it is most convenient
for the end user to get access to the Java or Scala Source directly.
One of the implementations can delegate to the other.
-
Method Summary
Modifier and TypeMethodDescriptionTheReadJournalimplementation for the Java API.TheReadJournalimplementation for the Scala API.
-
Method Details
-
javadslReadJournal
ReadJournal javadslReadJournal()TheReadJournalimplementation for the Java API. This corresponds to the instance that is returned byPersistenceQuery.getReadJournalFor(java.lang.Class<T>, java.lang.String, com.typesafe.config.Config). -
scaladslReadJournal
ReadJournal scaladslReadJournal()TheReadJournalimplementation for the Scala API. This corresponds to the instance that is returned byPersistenceQuery.readJournalFor(java.lang.String, com.typesafe.config.Config).
-