!per #18050 Make event adapter lookup more efficient
This commit is contained in:
parent
a22b3be9da
commit
b3fedb4cf8
3 changed files with 15 additions and 14 deletions
|
|
@ -5,12 +5,11 @@
|
|||
package akka.persistence.query
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import akka.actor.ActorSystem
|
||||
import akka.persistence.journal.{ EventAdapter, EventSeq }
|
||||
import akka.persistence.journal.EventSeq
|
||||
import akka.persistence.journal.ReadEventAdapter
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.{ BeforeAndAfterAll, Matchers, WordSpecLike }
|
||||
|
||||
import scala.concurrent.Await
|
||||
import scala.concurrent.duration._
|
||||
|
||||
|
|
@ -73,9 +72,6 @@ object ExampleQueryModels {
|
|||
case class NewModel(value: String)
|
||||
}
|
||||
|
||||
class PrefixStringWithPAdapter extends EventAdapter {
|
||||
class PrefixStringWithPAdapter extends ReadEventAdapter {
|
||||
override def fromJournal(event: Any, manifest: String) = EventSeq.single("p-" + event)
|
||||
|
||||
override def manifest(event: Any) = ""
|
||||
override def toJournal(event: Any) = throw new Exception("toJournal should not be called by query side")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue