Deprecation of ExtensionKey #22208

This commit is contained in:
Johan Andrén 2017-02-17 17:07:15 +01:00 committed by GitHub
parent 8f9b4f203a
commit cf6d5a4e8a
7 changed files with 78 additions and 14 deletions

View file

@ -74,7 +74,14 @@ akka.persistence.snapshot-store.plugin = "akka.persistence.no-snapshot-store"
}
}
object JournalPuppet extends ExtensionKey[JournalProbe]
object JournalPuppet extends ExtensionId[JournalProbe] with ExtensionIdProvider {
override def lookup()= JournalPuppet
override def createExtension(system: ExtendedActorSystem): JournalProbe =
new JournalProbe()(system)
override def get(system: ActorSystem): JournalProbe = super.get(system)
}
class JournalProbe(implicit private val system: ExtendedActorSystem) extends Extension {
val probe = TestProbe()
val ref = probe.ref