+per #16541 java docs for persistence query
This commit is contained in:
parent
f849793f36
commit
893578a8af
12 changed files with 468 additions and 38 deletions
|
|
@ -7,8 +7,9 @@ import java.util.concurrent.atomic.AtomicReference
|
|||
|
||||
import akka.actor._
|
||||
import akka.event.Logging
|
||||
import akka.stream.javadsl.Source
|
||||
|
||||
import scala.annotation.tailrec
|
||||
import scala.annotation.{varargs, tailrec}
|
||||
import scala.util.Failure
|
||||
|
||||
/**
|
||||
|
|
@ -62,7 +63,12 @@ class PersistenceQuery(system: ExtendedActorSystem) extends Extension {
|
|||
* Returns the [[akka.persistence.query.javadsl.ReadJournal]] specified by the given read journal configuration entry.
|
||||
*/
|
||||
final def getReadJournalFor(readJournalPluginId: String): javadsl.ReadJournal =
|
||||
new javadsl.ReadJournal(readJournalFor(readJournalPluginId))
|
||||
new javadsl.ReadJournal {
|
||||
val backing = readJournalFor(readJournalPluginId)
|
||||
@varargs def query[T, M](q: Query[T, M], hints: Hint*): Source[T, M] =
|
||||
backing.query(q, hints: _*).asJava
|
||||
}
|
||||
|
||||
|
||||
private def createPlugin(configPath: String): scaladsl.ReadJournal = {
|
||||
require(!isEmpty(configPath) && system.settings.config.hasPath(configPath),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue