Typed Distributed Data requires untyped Cluster [#25746](https://github.com/akka/akka/issues/25746)
This commit is contained in:
parent
2c145cd3c3
commit
8a44fca087
44 changed files with 656 additions and 368 deletions
|
|
@ -8,7 +8,6 @@ import akka.actor.Actor
|
|||
import akka.actor.ActorSystem
|
||||
import akka.actor.Props
|
||||
import akka.actor.Stash
|
||||
import akka.cluster.Cluster
|
||||
import akka.testkit.ImplicitSender
|
||||
import akka.testkit.TestKit
|
||||
import com.typesafe.config.ConfigFactory
|
||||
|
|
@ -25,12 +24,14 @@ object LocalConcurrencySpec {
|
|||
}
|
||||
|
||||
class Updater extends Actor with Stash {
|
||||
implicit val cluster = Cluster(context.system)
|
||||
|
||||
implicit val selfUniqueAddress = DistributedData(context.system).selfUniqueAddress
|
||||
|
||||
val replicator = DistributedData(context.system).replicator
|
||||
|
||||
def receive = {
|
||||
case s: String ⇒
|
||||
val update = Replicator.Update(Updater.key, ORSet.empty[String], Replicator.WriteLocal)(_ + s)
|
||||
val update = Replicator.Update(Updater.key, ORSet.empty[String], Replicator.WriteLocal)(_ :+ s)
|
||||
replicator ! update
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue