actor: allow seamless access to untyped extensions given typed ActorSystem (#28294)
* actor: allow seamless access to untyped extensions given typed ActorSystem * add overrides with concrete type for Java API everywhere
This commit is contained in:
parent
2c96a57d89
commit
702b6a7f41
70 changed files with 192 additions and 49 deletions
|
|
@ -283,10 +283,9 @@ class EventSourcedBehaviorSpec
|
|||
with LogCapturing {
|
||||
|
||||
import EventSourcedBehaviorSpec._
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
|
||||
val queries: LeveldbReadJournal =
|
||||
PersistenceQuery(system.toClassic).readJournalFor[LeveldbReadJournal](LeveldbReadJournal.Identifier)
|
||||
PersistenceQuery(system).readJournalFor[LeveldbReadJournal](LeveldbReadJournal.Identifier)
|
||||
|
||||
val pidCounter = new AtomicInteger(0)
|
||||
private def nextPid(): PersistenceId = PersistenceId.ofUniqueId(s"c${pidCounter.incrementAndGet()})")
|
||||
|
|
|
|||
|
|
@ -96,13 +96,11 @@ class EventSourcedEventAdapterSpec
|
|||
State
|
||||
}
|
||||
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
|
||||
val pidCounter = new AtomicInteger(0)
|
||||
private def nextPid(): PersistenceId = PersistenceId.ofUniqueId(s"c${pidCounter.incrementAndGet()})")
|
||||
|
||||
val queries: LeveldbReadJournal =
|
||||
PersistenceQuery(system.toClassic).readJournalFor[LeveldbReadJournal](LeveldbReadJournal.Identifier)
|
||||
PersistenceQuery(system).readJournalFor[LeveldbReadJournal](LeveldbReadJournal.Identifier)
|
||||
|
||||
private def behavior(pid: PersistenceId, probe: ActorRef[String]): EventSourcedBehavior[String, String, String] =
|
||||
EventSourcedBehavior(pid, "", commandHandler = { (_, command) =>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
|||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
import akka.persistence.serialization.Snapshot
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.serialization.Serialization
|
||||
|
|
@ -64,7 +63,7 @@ class SnapshotRecoveryWithEmptyJournalSpec
|
|||
|
||||
val snapshotsDir: File = new File(survivingSnapshotPath)
|
||||
|
||||
val serializationExtension: Serialization = SerializationExtension(system.toClassic)
|
||||
val serializationExtension: Serialization = SerializationExtension(system)
|
||||
|
||||
val persistenceId: String = system.name
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue