diff --git a/akka-typed-tests/src/test/java/akka/typed/DispatcherSelectorTest.java b/akka-actor-typed-tests/src/test/java/akka/actor/typed/DispatcherSelectorTest.java
similarity index 95%
rename from akka-typed-tests/src/test/java/akka/typed/DispatcherSelectorTest.java
rename to akka-actor-typed-tests/src/test/java/akka/actor/typed/DispatcherSelectorTest.java
index 83bcb69381..90d15cc19c 100644
--- a/akka-typed-tests/src/test/java/akka/typed/DispatcherSelectorTest.java
+++ b/akka-actor-typed-tests/src/test/java/akka/actor/typed/DispatcherSelectorTest.java
@@ -1,4 +1,4 @@
-package akka.typed;
+package akka.actor.typed;
import scala.concurrent.ExecutionContext;
diff --git a/akka-typed-tests/src/test/java/akka/typed/ExtensionsTest.java b/akka-actor-typed-tests/src/test/java/akka/actor/typed/ExtensionsTest.java
similarity index 95%
rename from akka-typed-tests/src/test/java/akka/typed/ExtensionsTest.java
rename to akka-actor-typed-tests/src/test/java/akka/actor/typed/ExtensionsTest.java
index 279c058357..99e8766d63 100644
--- a/akka-typed-tests/src/test/java/akka/typed/ExtensionsTest.java
+++ b/akka-actor-typed-tests/src/test/java/akka/actor/typed/ExtensionsTest.java
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed;
+package akka.actor.typed;
import akka.actor.*;
import com.typesafe.config.ConfigFactory;
@@ -46,7 +46,7 @@ public class ExtensionsTest extends JUnitSuite {
Behavior.empty(),
"loadJavaExtensionsFromConfig",
Optional.empty(),
- Optional.of(ConfigFactory.parseString("akka.typed.extensions += \"akka.typed.ExtensionsTest$MyExtension\"").resolve()),
+ Optional.of(ConfigFactory.parseString("akka.typed.extensions += \"akka.actor.typed.ExtensionsTest$MyExtension\"").resolve()),
Optional.empty(),
Optional.empty()
);
diff --git a/akka-typed-tests/src/test/java/akka/typed/javadsl/ActorCompile.java b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/ActorCompile.java
similarity index 95%
rename from akka-typed-tests/src/test/java/akka/typed/javadsl/ActorCompile.java
rename to akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/ActorCompile.java
index c9119f38a1..92577bfc39 100644
--- a/akka-typed-tests/src/test/java/akka/typed/javadsl/ActorCompile.java
+++ b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/ActorCompile.java
@@ -1,12 +1,12 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.javadsl;
+package akka.actor.typed.javadsl;
-import akka.typed.*;
-import akka.typed.ActorContext;
+import akka.actor.typed.*;
+import akka.actor.typed.ActorContext;
-import static akka.typed.javadsl.Actor.*;
+import static akka.actor.typed.javadsl.Actor.*;
import java.util.concurrent.TimeUnit;
import scala.concurrent.duration.Duration;
diff --git a/akka-typed-tests/src/test/java/akka/typed/javadsl/AdapterTest.java b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/AdapterTest.java
similarity index 98%
rename from akka-typed-tests/src/test/java/akka/typed/javadsl/AdapterTest.java
rename to akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/AdapterTest.java
index 7a59034fd2..b9bce81cad 100644
--- a/akka-typed-tests/src/test/java/akka/typed/javadsl/AdapterTest.java
+++ b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/AdapterTest.java
@@ -2,7 +2,7 @@
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.javadsl;
+package akka.actor.typed.javadsl;
import org.junit.ClassRule;
import org.junit.Test;
@@ -13,13 +13,13 @@ import java.util.concurrent.TimeUnit;
import akka.actor.ActorSystem;
import akka.testkit.AkkaJUnitActorSystemResource;
import akka.testkit.AkkaSpec;
-import akka.typed.ActorRef;
-import akka.typed.Behavior;
-import akka.typed.Signal;
-import akka.typed.Terminated;
+import akka.actor.typed.ActorRef;
+import akka.actor.typed.Behavior;
+import akka.actor.typed.Signal;
+import akka.actor.typed.Terminated;
import akka.testkit.javadsl.TestKit;
import akka.actor.SupervisorStrategy;
-import static akka.typed.javadsl.Actor.*;
+import static akka.actor.typed.javadsl.Actor.*;
public class AdapterTest extends JUnitSuite {
diff --git a/akka-typed-tests/src/test/java/akka/typed/javadsl/BehaviorBuilderTest.java b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/BehaviorBuilderTest.java
similarity index 89%
rename from akka-typed-tests/src/test/java/akka/typed/javadsl/BehaviorBuilderTest.java
rename to akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/BehaviorBuilderTest.java
index 2275b31a55..41070b3792 100644
--- a/akka-typed-tests/src/test/java/akka/typed/javadsl/BehaviorBuilderTest.java
+++ b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/BehaviorBuilderTest.java
@@ -1,19 +1,19 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.javadsl;
+package akka.actor.typed.javadsl;
import org.junit.Test;
import org.scalatest.junit.JUnitSuite;
-import akka.typed.Behavior;
-import akka.typed.Terminated;
-import akka.typed.ActorRef;
+import akka.actor.typed.Behavior;
+import akka.actor.typed.Terminated;
+import akka.actor.typed.ActorRef;
import java.util.ArrayList;
-import static akka.typed.javadsl.Actor.same;
-import static akka.typed.javadsl.Actor.stopped;
+import static akka.actor.typed.javadsl.Actor.same;
+import static akka.actor.typed.javadsl.Actor.stopped;
/**
* Test creating [[Behavior]]s using [[BehaviorBuilder]]
diff --git a/akka-typed-tests/src/test/java/akka/typed/javadsl/ReceiveBuilderTest.java b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/ReceiveBuilderTest.java
similarity index 96%
rename from akka-typed-tests/src/test/java/akka/typed/javadsl/ReceiveBuilderTest.java
rename to akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/ReceiveBuilderTest.java
index 78a792c0d9..208eee9287 100644
--- a/akka-typed-tests/src/test/java/akka/typed/javadsl/ReceiveBuilderTest.java
+++ b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/ReceiveBuilderTest.java
@@ -1,12 +1,12 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.javadsl;
+package akka.actor.typed.javadsl;
import org.junit.Test;
import org.scalatest.junit.JUnitSuite;
-import akka.typed.Behavior;
+import akka.actor.typed.Behavior;
import static org.junit.Assert.assertEquals;
diff --git a/akka-typed-tests/src/test/java/akka/typed/javadsl/WatchTest.java b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/WatchTest.java
similarity index 95%
rename from akka-typed-tests/src/test/java/akka/typed/javadsl/WatchTest.java
rename to akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/WatchTest.java
index 0f1e0f3b27..5347c01beb 100644
--- a/akka-typed-tests/src/test/java/akka/typed/javadsl/WatchTest.java
+++ b/akka-actor-typed-tests/src/test/java/akka/actor/typed/javadsl/WatchTest.java
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.javadsl;
+package akka.actor.typed.javadsl;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.TimeUnit;
@@ -13,9 +13,9 @@ import scala.concurrent.duration.Duration;
import akka.util.Timeout;
import org.junit.Test;
-import akka.typed.*;
-import static akka.typed.javadsl.Actor.*;
-import static akka.typed.javadsl.AskPattern.*;
+import akka.actor.typed.*;
+import static akka.actor.typed.javadsl.Actor.*;
+import static akka.actor.typed.javadsl.AskPattern.*;
public class WatchTest extends JUnitSuite {
diff --git a/akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java b/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java
similarity index 96%
rename from akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java
rename to akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java
index 6392a2fc2b..2bb636cf96 100644
--- a/akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java
+++ b/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java
@@ -1,15 +1,15 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package jdocs.akka.typed;
+package jdocs.akka.actor.typed;
//#imports
-import akka.typed.ActorRef;
-import akka.typed.ActorSystem;
-import akka.typed.Behavior;
-import akka.typed.Terminated;
-import akka.typed.javadsl.Actor;
-import akka.typed.javadsl.AskPattern;
+import akka.actor.typed.ActorRef;
+import akka.actor.typed.ActorSystem;
+import akka.actor.typed.Behavior;
+import akka.actor.typed.Terminated;
+import akka.actor.typed.javadsl.Actor;
+import akka.actor.typed.javadsl.AskPattern;
import akka.util.Timeout;
//#imports
diff --git a/akka-typed-tests/src/test/java/jdocs/akka/typed/MutableIntroTest.java b/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/MutableIntroTest.java
similarity index 93%
rename from akka-typed-tests/src/test/java/jdocs/akka/typed/MutableIntroTest.java
rename to akka-actor-typed-tests/src/test/java/jdocs/akka/typed/MutableIntroTest.java
index a2bb502506..5504eb3990 100644
--- a/akka-typed-tests/src/test/java/jdocs/akka/typed/MutableIntroTest.java
+++ b/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/MutableIntroTest.java
@@ -1,14 +1,14 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package jdocs.akka.typed;
+package jdocs.akka.actor.typed;
//#imports
-import akka.typed.ActorRef;
-import akka.typed.Behavior;
-import akka.typed.javadsl.Actor;
-import akka.typed.javadsl.Actor.Receive;
-import akka.typed.javadsl.ActorContext;
+import akka.actor.typed.ActorRef;
+import akka.actor.typed.Behavior;
+import akka.actor.typed.javadsl.Actor;
+import akka.actor.typed.javadsl.Actor.Receive;
+import akka.actor.typed.javadsl.ActorContext;
//#imports
import java.util.ArrayList;
import java.util.List;
diff --git a/akka-typed-tests/src/test/resources/application.conf b/akka-actor-typed-tests/src/test/resources/application.conf
similarity index 100%
rename from akka-typed-tests/src/test/resources/application.conf
rename to akka-actor-typed-tests/src/test/resources/application.conf
diff --git a/akka-actor-typed-tests/src/test/resources/reference.conf b/akka-actor-typed-tests/src/test/resources/reference.conf
new file mode 100644
index 0000000000..5bbd174c10
--- /dev/null
+++ b/akka-actor-typed-tests/src/test/resources/reference.conf
@@ -0,0 +1,4 @@
+akka.typed {
+ # for the akka.actor.ExtensionSpec
+ library-extensions += "akka.actor.typed.InstanceCountingExtension"
+}
diff --git a/akka-typed-tests/src/test/scala/akka/typed/ActorContextSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/ActorContextSpec.scala
similarity index 99%
rename from akka-typed-tests/src/test/scala/akka/typed/ActorContextSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/ActorContextSpec.scala
index 374a30a55f..e41dcc82e9 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/ActorContextSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/ActorContextSpec.scala
@@ -1,13 +1,13 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import scala.concurrent.duration._
import scala.concurrent.Future
import com.typesafe.config.ConfigFactory
import akka.actor.{ DeadLetterSuppression, InvalidMessageException }
-import akka.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.Actor
import scala.language.existentials
diff --git a/akka-typed-tests/src/test/scala/akka/typed/AskSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/AskSpec.scala
similarity index 89%
rename from akka-typed-tests/src/test/scala/akka/typed/AskSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/AskSpec.scala
index 9233495585..d0f0427244 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/AskSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/AskSpec.scala
@@ -1,15 +1,15 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
import org.scalatest.concurrent.ScalaFutures
import akka.util.Timeout
import akka.pattern.AskTimeoutException
-import akka.typed.scaladsl.Actor._
-import akka.typed.scaladsl.AskPattern._
+import akka.actor.typed.scaladsl.Actor._
+import akka.actor.typed.scaladsl.AskPattern._
object AskSpec {
@@ -65,8 +65,8 @@ class AskSpec extends TypedSpec with ScalaFutures {
/** See issue #19947 (MatchError with adapted ActorRef) */
def `must fail the future if the actor doesn't exist`(): Unit = {
val noSuchActor: ActorRef[Msg] = system match {
- case adaptedSys: akka.typed.internal.adapter.ActorSystemAdapter[_] ⇒
- import akka.typed.scaladsl.adapter._
+ case adaptedSys: akka.actor.typed.internal.adapter.ActorSystemAdapter[_] ⇒
+ import akka.actor.typed.scaladsl.adapter._
adaptedSys.untyped.provider.resolveActorRef("/foo/bar")
case _ ⇒
fail("this test must only run in an adapted actor system")
diff --git a/akka-typed-tests/src/test/scala/akka/typed/BehaviorSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/BehaviorSpec.scala
similarity index 99%
rename from akka-typed-tests/src/test/scala/akka/typed/BehaviorSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/BehaviorSpec.scala
index 31dc5c3701..12889efe74 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/BehaviorSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/BehaviorSpec.scala
@@ -1,10 +1,10 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
-import akka.typed.scaladsl.{ Actor ⇒ SActor }
-import akka.typed.javadsl.{ Actor ⇒ JActor, ActorContext ⇒ JActorContext }
+import akka.actor.typed.scaladsl.{ Actor ⇒ SActor }
+import akka.actor.typed.javadsl.{ Actor ⇒ JActor, ActorContext ⇒ JActorContext }
import akka.japi.function.{ Function ⇒ F1e, Function2 ⇒ F2, Procedure2 ⇒ P2 }
import akka.japi.pf.{ FI, PFBuilder }
import java.util.function.{ Function ⇒ F1 }
diff --git a/akka-typed-tests/src/test/scala/akka/typed/DeferredSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/DeferredSpec.scala
similarity index 96%
rename from akka-typed-tests/src/test/scala/akka/typed/DeferredSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/DeferredSpec.scala
index 1590ada735..e97fac8d34 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/DeferredSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/DeferredSpec.scala
@@ -1,14 +1,14 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.util.control.NoStackTrace
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.Actor.BehaviorDecorators
-import akka.typed.scaladsl.AskPattern._
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.Actor.BehaviorDecorators
+import akka.actor.typed.scaladsl.AskPattern._
import akka.typed.testkit.{ EffectfulActorContext, Inbox, TestKitSettings }
import akka.typed.testkit.scaladsl._
diff --git a/akka-typed-tests/src/test/scala/akka/typed/ExtensionsSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/ExtensionsSpec.scala
similarity index 94%
rename from akka-typed-tests/src/test/scala/akka/typed/ExtensionsSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/ExtensionsSpec.scala
index e0d1be2d09..b48b906c1b 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/ExtensionsSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/ExtensionsSpec.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import java.util.concurrent.atomic.AtomicInteger
@@ -82,7 +82,7 @@ class ExtensionsSpec extends TypedSpecSetup {
def `03 should load extensions from the configuration`(): Unit =
withEmptyActorSystem("ExtensionsSpec03", Some(ConfigFactory.parseString(
"""
- akka.typed.extensions = ["akka.typed.DummyExtension1$", "akka.typed.SlowExtension$"]
+ akka.typed.extensions = ["akka.actor.typed.DummyExtension1$", "akka.actor.typed.SlowExtension$"]
"""))
) { system ⇒
system.hasExtension(DummyExtension1) should ===(true)
@@ -96,7 +96,7 @@ class ExtensionsSpec extends TypedSpecSetup {
def create(): Unit = {
ActorSystem[Any](Behavior.EmptyBehavior, "ExtensionsSpec04", config = Some(ConfigFactory.parseString(
"""
- akka.typed.extensions = ["akka.typed.FailingToLoadExtension$"]
+ akka.typed.extensions = ["akka.actor.typed.FailingToLoadExtension$"]
""")))
}
intercept[RuntimeException] {
@@ -130,7 +130,7 @@ class ExtensionsSpec extends TypedSpecSetup {
intercept[RuntimeException] {
withEmptyActorSystem(
"ExtensionsSpec07",
- Some(ConfigFactory.parseString("""akka.typed.library-extensions += "akka.typed.FailingToLoadExtension$" """))
+ Some(ConfigFactory.parseString("""akka.typed.library-extensions += "akka.actor.typed.FailingToLoadExtension$" """))
) { _ ⇒ () }
}
@@ -138,7 +138,7 @@ class ExtensionsSpec extends TypedSpecSetup {
intercept[RuntimeException] {
withEmptyActorSystem(
"ExtensionsSpec08",
- Some(ConfigFactory.parseString("""akka.typed.library-extensions += "akka.typed.MissingExtension" """))
+ Some(ConfigFactory.parseString("""akka.typed.library-extensions += "akka.actor.typed.MissingExtension" """))
) { _ ⇒ () }
}
@@ -152,7 +152,7 @@ class ExtensionsSpec extends TypedSpecSetup {
}
def `10 not create an extension multiple times when using the ActorSystemAdapter`(): Unit = {
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
val untypedSystem = akka.actor.ActorSystem()
try {
diff --git a/akka-typed-tests/src/test/scala/akka/typed/PerformanceSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/PerformanceSpec.scala
similarity index 93%
rename from akka-typed-tests/src/test/scala/akka/typed/PerformanceSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/PerformanceSpec.scala
index cafef74c55..03823eef0b 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/PerformanceSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/PerformanceSpec.scala
@@ -1,19 +1,19 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import org.junit.runner.RunWith
-import akka.typed.scaladsl.Actor._
+import akka.actor.typed.scaladsl.Actor._
import akka.util.Timeout
@RunWith(classOf[org.scalatest.junit.JUnitRunner])
class PerformanceSpec extends TypedSpec(
ConfigFactory.parseString("""
# increase this if you do real benchmarking
- akka.typed.PerformanceSpec.iterations=100000
+ akka.actor.typed.PerformanceSpec.iterations=100000
""")) {
override def setTimeout = Timeout(20.seconds)
@@ -62,7 +62,7 @@ class PerformanceSpec extends TypedSpec(
}
}
- val iterations = nativeSystem.settings.config.getInt("akka.typed.PerformanceSpec.iterations")
+ val iterations = nativeSystem.settings.config.getInt("akka.actor.typed.PerformanceSpec.iterations")
trait CommonTests {
implicit def system: ActorSystem[TypedSpec.Command]
diff --git a/akka-typed-tests/src/test/scala/akka/typed/PropsSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/PropsSpec.scala
similarity index 98%
rename from akka-typed-tests/src/test/scala/akka/typed/PropsSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/PropsSpec.scala
index 72abfd4d61..d45c23b6e7 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/PropsSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/PropsSpec.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
class PropsSpec extends TypedSpecSetup {
diff --git a/akka-typed-tests/src/test/scala/akka/typed/RestarterSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/RestarterSpec.scala
similarity index 99%
rename from akka-typed-tests/src/test/scala/akka/typed/RestarterSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/RestarterSpec.scala
index 7d67b5dcf5..b2c87a607b 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/RestarterSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/RestarterSpec.scala
@@ -1,10 +1,10 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import scala.concurrent.duration._
-import akka.typed.scaladsl.Actor._
+import akka.actor.typed.scaladsl.Actor._
import akka.typed.testkit.{ EffectfulActorContext, Inbox, TestKitSettings }
import scala.util.control.NoStackTrace
@@ -227,7 +227,7 @@ class RestarterSpec extends TypedSpec {
}
trait RealTests extends StartSupport {
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
implicit def system: ActorSystem[TypedSpec.Command]
implicit val testSettings = TestKitSettings(system)
diff --git a/akka-typed-tests/src/test/scala/akka/typed/StepWise.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/StepWise.scala
similarity index 98%
rename from akka-typed-tests/src/test/scala/akka/typed/StepWise.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/StepWise.scala
index b4d4d61511..d819ed4109 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/StepWise.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/StepWise.scala
@@ -1,12 +1,12 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import scala.concurrent.duration.FiniteDuration
import java.util.concurrent.TimeoutException
-import akka.typed.scaladsl.Actor._
+import akka.actor.typed.scaladsl.Actor._
import scala.concurrent.duration.Deadline
@@ -54,7 +54,7 @@ object StepWise {
protected def getFrames: Array[StackTraceElement] =
Thread.currentThread.getStackTrace.dropWhile { elem ⇒
val name = elem.getClassName
- name.startsWith("java.lang.Thread") || name.startsWith("akka.typed.StepWise")
+ name.startsWith("java.lang.Thread") || name.startsWith("akka.actor.typed.StepWise")
}
}
private class WithTrace extends Trace {
diff --git a/akka-typed-tests/src/test/scala/akka/typed/TimerSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/TimerSpec.scala
similarity index 98%
rename from akka-typed-tests/src/test/scala/akka/typed/TimerSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/TimerSpec.scala
index e2fb7755c5..2237124e78 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/TimerSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/TimerSpec.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
@@ -10,8 +10,8 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.duration._
import scala.util.control.NoStackTrace
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.TimerScheduler
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.TimerScheduler
import akka.typed.testkit.TestKitSettings
import akka.typed.testkit.scaladsl._
diff --git a/akka-typed-tests/src/test/scala/akka/typed/TypedSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/TypedSpec.scala
similarity index 98%
rename from akka-typed-tests/src/test/scala/akka/typed/TypedSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/TypedSpec.scala
index b17da3bc3c..fdba1f7a12 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/TypedSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/TypedSpec.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import org.scalatest.refspec.RefSpec
import org.scalatest.Matchers
@@ -20,14 +20,14 @@ import akka.actor.ActorInitializationException
import language.existentials
import akka.testkit.TestEvent.Mute
-import akka.typed.scaladsl.Actor._
+import akka.actor.typed.scaladsl.Actor._
import org.scalatest.concurrent.ScalaFutures
import org.scalactic.TypeCheckedTripleEquals
import org.scalactic.CanEqual
import org.junit.runner.RunWith
import scala.util.control.NonFatal
-import akka.typed.scaladsl.AskPattern
+import akka.actor.typed.scaladsl.AskPattern
import scala.util.control.NoStackTrace
import akka.typed.testkit.{ Inbox, TestKitSettings }
@@ -78,7 +78,7 @@ abstract class TypedSpec(val config: Config) extends TypedSpecSetup {
def nextName(prefix: String = "a"): String = s"$prefix-${nameCounter.next()}"
def start[T](behv: Behavior[T]): ActorRef[T] = {
- import akka.typed.scaladsl.AskPattern._
+ import akka.actor.typed.scaladsl.AskPattern._
import akka.typed.testkit.scaladsl._
implicit val testSettings = TestKitSettings(system)
Await.result(system ? TypedSpec.Create(behv, nextName()), 3.seconds.dilated)
diff --git a/akka-typed-tests/src/test/scala/akka/typed/WatchSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/WatchSpec.scala
similarity index 95%
rename from akka-typed-tests/src/test/scala/akka/typed/WatchSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/WatchSpec.scala
index b836942518..65323e2285 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/WatchSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/WatchSpec.scala
@@ -1,12 +1,12 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import scala.concurrent._
import scala.concurrent.duration._
-import akka.typed.scaladsl.Actor._
-import akka.typed.scaladsl.AskPattern._
+import akka.actor.typed.scaladsl.Actor._
+import akka.actor.typed.scaladsl.AskPattern._
import akka.testkit._
@org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner])
diff --git a/akka-typed-tests/src/test/scala/akka/typed/internal/ActorCellSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ActorCellSpec.scala
similarity index 99%
rename from akka-typed-tests/src/test/scala/akka/typed/internal/ActorCellSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ActorCellSpec.scala
index 60005cf684..b9be95f6e8 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/internal/ActorCellSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ActorCellSpec.scala
@@ -1,11 +1,11 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.Actor._
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.Actor._
import org.scalactic.ConversionCheckedTripleEquals
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.exceptions.TestFailedException
diff --git a/akka-typed-tests/src/test/scala/akka/typed/internal/ActorSystemSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ActorSystemSpec.scala
similarity index 96%
rename from akka-typed-tests/src/test/scala/akka/typed/internal/ActorSystemSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ActorSystemSpec.scala
index cac549ef14..1b548a1717 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/internal/ActorSystemSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ActorSystemSpec.scala
@@ -1,13 +1,13 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.Done
import akka.actor.InvalidMessageException
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.Actor._
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.Actor._
import akka.typed.testkit.Inbox
import akka.util.Timeout
import org.junit.runner.RunWith
@@ -122,7 +122,7 @@ class ActorSystemSpec extends Spec with Matchers with BeforeAndAfterAll with Sca
def `must start system actors and mangle their names`(): Unit = {
withSystem("systemActorOf", Actor.empty[String]) { sys ⇒
- import akka.typed.scaladsl.AskPattern._
+ import akka.actor.typed.scaladsl.AskPattern._
implicit val timeout = Timeout(1.second)
implicit val sched = sys.scheduler
diff --git a/akka-typed-tests/src/test/scala/akka/typed/internal/ActorSystemStub.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ActorSystemStub.scala
similarity index 85%
rename from akka-typed-tests/src/test/scala/akka/typed/internal/ActorSystemStub.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ActorSystemStub.scala
index 61190dcc45..837fa879cc 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/internal/ActorSystemStub.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ActorSystemStub.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.{ actor ⇒ a, event ⇒ e }
@@ -10,7 +10,7 @@ import scala.concurrent._
import com.typesafe.config.ConfigFactory
import java.util.concurrent.ThreadFactory
-import akka.typed.testkit.Inbox
+import akka.typed.{ BusLogging, DefaultLoggingFilter, EventStream }
import akka.util.Timeout
private[typed] class ActorSystemStub(val name: String)
@@ -23,15 +23,15 @@ private[typed] class ActorSystemStub(val name: String)
override def tell(msg: Nothing): Unit = throw new RuntimeException("must not send message to ActorSystemStub")
override def isLocal: Boolean = true
- override def sendSystem(signal: akka.typed.internal.SystemMessage): Unit =
+ override def sendSystem(signal: akka.actor.typed.internal.SystemMessage): Unit =
throw new RuntimeException("must not send SYSTEM message to ActorSystemStub")
val deadLettersInbox = new DebugRef[Any](path.parent / "deadLetters", true)
- override def deadLetters[U]: akka.typed.ActorRef[U] = deadLettersInbox
+ override def deadLetters[U]: akka.actor.typed.ActorRef[U] = deadLettersInbox
val controlledExecutor = new ControlledExecutor
implicit override def executionContext: scala.concurrent.ExecutionContextExecutor = controlledExecutor
- override def dispatchers: akka.typed.Dispatchers = new Dispatchers {
+ override def dispatchers: akka.actor.typed.Dispatchers = new Dispatchers {
def lookup(selector: DispatcherSelector): ExecutionContextExecutor = controlledExecutor
def shutdown(): Unit = ()
}
@@ -45,11 +45,11 @@ private[typed] class ActorSystemStub(val name: String)
override def scheduler: a.Scheduler = throw new UnsupportedOperationException("no scheduler")
private val terminationPromise = Promise[Terminated]
- override def terminate(): Future[akka.typed.Terminated] = {
+ override def terminate(): Future[akka.actor.typed.Terminated] = {
terminationPromise.trySuccess(Terminated(this)(null))
terminationPromise.future
}
- override def whenTerminated: Future[akka.typed.Terminated] = terminationPromise.future
+ override def whenTerminated: Future[akka.actor.typed.Terminated] = terminationPromise.future
override val startTime: Long = System.currentTimeMillis()
override def uptime: Long = System.currentTimeMillis() - startTime
override def threadFactory: java.util.concurrent.ThreadFactory = new ThreadFactory {
diff --git a/akka-typed-tests/src/test/scala/akka/typed/internal/ControlledExecutor.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ControlledExecutor.scala
similarity index 94%
rename from akka-typed-tests/src/test/scala/akka/typed/internal/ControlledExecutor.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ControlledExecutor.scala
index 7ee8c44356..91ade6fcf6 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/internal/ControlledExecutor.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/ControlledExecutor.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed.internal
+package akka.actor.typed.internal
import scala.concurrent.ExecutionContextExecutor
import java.util.LinkedList
diff --git a/akka-typed-tests/src/test/scala/akka/typed/internal/DebugRef.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/DebugRef.scala
similarity index 98%
rename from akka-typed-tests/src/test/scala/akka/typed/internal/DebugRef.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/DebugRef.scala
index 24223c10ec..71dd9c51e6 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/internal/DebugRef.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/DebugRef.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.{ actor ⇒ a }
diff --git a/akka-typed-tests/src/test/scala/akka/typed/internal/EventStreamSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/EventStreamSpec.scala
similarity index 98%
rename from akka-typed-tests/src/test/scala/akka/typed/internal/EventStreamSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/EventStreamSpec.scala
index 3b8dc64acc..63b5321c1f 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/internal/EventStreamSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/EventStreamSpec.scala
@@ -1,14 +1,15 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.Done
import akka.event.Logging._
-import akka.typed.scaladsl.Actor._
-import akka.typed.scaladsl.AskPattern._
+import akka.actor.typed.scaladsl.Actor._
+import akka.actor.typed.scaladsl.AskPattern._
import akka.typed.testkit.Inbox
+import akka.typed.Logger
import com.typesafe.config.ConfigFactory
import org.scalatest.concurrent.Eventually
import org.scalatest.concurrent.PatienceConfiguration.Timeout
@@ -33,7 +34,7 @@ object EventStreamSpec {
}
val config = ConfigFactory.parseString("""
-akka.typed.loggers = ["akka.typed.internal.EventStreamSpec$MyLogger"]
+akka.typed.loggers = ["akka.actor.typed.internal.EventStreamSpec$MyLogger"]
""")
// class hierarchy for subchannel test
diff --git a/akka-typed-tests/src/test/scala/akka/typed/internal/FunctionRefSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/FunctionRefSpec.scala
similarity index 99%
rename from akka-typed-tests/src/test/scala/akka/typed/internal/FunctionRefSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/FunctionRefSpec.scala
index 1748af92eb..00c2d07017 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/internal/FunctionRefSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/internal/FunctionRefSpec.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.actor.InvalidMessageException
diff --git a/akka-typed-tests/src/test/scala/akka/typed/receptionist/LocalReceptionistSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/receptionist/LocalReceptionistSpec.scala
similarity index 95%
rename from akka-typed-tests/src/test/scala/akka/typed/receptionist/LocalReceptionistSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/receptionist/LocalReceptionistSpec.scala
index fcb59a70ff..424533e9c1 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/receptionist/LocalReceptionistSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/receptionist/LocalReceptionistSpec.scala
@@ -1,12 +1,12 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed.receptionist
+package akka.actor.typed.receptionist
-import akka.typed._
-import akka.typed.receptionist.Receptionist._
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.AskPattern._
+import akka.actor.typed._
+import akka.actor.typed.receptionist.Receptionist._
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.AskPattern._
import akka.typed.testkit.EffectfulActorContext
import akka.typed.testkit.Inbox
import akka.typed.testkit.TestKitSettings
@@ -33,7 +33,7 @@ class LocalReceptionistSpec extends TypedSpec with Eventually {
}
}
- import akka.typed.internal.receptionist.ReceptionistImpl.{ localOnlyBehavior ⇒ behavior }
+ import akka.actor.typed.internal.receptionist.ReceptionistImpl.{ localOnlyBehavior ⇒ behavior }
trait CommonTests extends StartSupport {
implicit def system: ActorSystem[TypedSpec.Command]
diff --git a/akka-typed-tests/src/test/scala/akka/typed/scaladsl/ImmutablePartial.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/ImmutablePartial.scala
similarity index 98%
rename from akka-typed-tests/src/test/scala/akka/typed/scaladsl/ImmutablePartial.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/ImmutablePartial.scala
index 8604393fbb..c8981527d6 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/scaladsl/ImmutablePartial.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/ImmutablePartial.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package scaladsl
import akka.typed.testkit.{ EffectfulActorContext, TestKitSettings }
diff --git a/akka-typed-tests/src/test/scala/akka/typed/scaladsl/OnSignalSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/OnSignalSpec.scala
similarity index 97%
rename from akka-typed-tests/src/test/scala/akka/typed/scaladsl/OnSignalSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/OnSignalSpec.scala
index 58f8347e05..0d0514f071 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/scaladsl/OnSignalSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/OnSignalSpec.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package scaladsl
import akka.Done
diff --git a/akka-typed-tests/src/test/scala/akka/typed/scaladsl/adapter/AdapterSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/adapter/AdapterSpec.scala
similarity index 97%
rename from akka-typed-tests/src/test/scala/akka/typed/scaladsl/adapter/AdapterSpec.scala
rename to akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/adapter/AdapterSpec.scala
index f0515d1f52..46fa92a323 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/scaladsl/adapter/AdapterSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/adapter/AdapterSpec.scala
@@ -1,18 +1,18 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.scaladsl.adapter
+package akka.actor.typed.scaladsl.adapter
import scala.concurrent.duration._
import scala.util.control.NoStackTrace
-import akka.typed.ActorRef
+import akka.actor.typed.ActorRef
import akka.actor.{ InvalidMessageException, Props }
-import akka.typed.Behavior
-import akka.typed.Terminated
-import akka.typed.scaladsl.Actor
+import akka.actor.typed.Behavior
+import akka.actor.typed.Terminated
+import akka.actor.typed.scaladsl.Actor
import akka.{ actor ⇒ untyped }
import akka.testkit._
-import akka.typed.Behavior.UntypedBehavior
+import akka.actor.typed.Behavior.UntypedBehavior
object AdapterSpec {
val untyped1: untyped.Props = untyped.Props(new Untyped1)
diff --git a/akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala b/akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala
similarity index 96%
rename from akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala
rename to akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala
index 3982d839b5..5a59361c70 100644
--- a/akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala
@@ -1,12 +1,12 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package docs.akka.typed
+package docs.akka.actor.typed
//#imports
-import akka.typed._
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.AskPattern._
+import akka.actor.typed._
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.AskPattern._
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.concurrent.Await
diff --git a/akka-typed-tests/src/test/scala/docs/akka/typed/MutableIntroSpec.scala b/akka-actor-typed-tests/src/test/scala/docs/akka/typed/MutableIntroSpec.scala
similarity index 94%
rename from akka-typed-tests/src/test/scala/docs/akka/typed/MutableIntroSpec.scala
rename to akka-actor-typed-tests/src/test/scala/docs/akka/typed/MutableIntroSpec.scala
index 1aa03008ae..b666cd15ae 100644
--- a/akka-typed-tests/src/test/scala/docs/akka/typed/MutableIntroSpec.scala
+++ b/akka-actor-typed-tests/src/test/scala/docs/akka/typed/MutableIntroSpec.scala
@@ -1,13 +1,13 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package docs.akka.typed
+package docs.akka.actor.typed
//#imports
-import akka.typed._
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.ActorContext
-import akka.typed.scaladsl.AskPattern._
+import akka.actor.typed._
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.ActorContext
+import akka.actor.typed.scaladsl.AskPattern._
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.concurrent.Await
diff --git a/akka-typed/src/main/resources/reference.conf b/akka-actor-typed/src/main/resources/reference.conf
similarity index 75%
rename from akka-typed/src/main/resources/reference.conf
rename to akka-actor-typed/src/main/resources/reference.conf
index e4a4b46cae..c620d00512 100644
--- a/akka-typed/src/main/resources/reference.conf
+++ b/akka-actor-typed/src/main/resources/reference.conf
@@ -31,17 +31,8 @@ akka.typed {
# TODO: move these out somewhere else when doing #23632
akka.actor {
- serializers {
- typed-misc = "akka.typed.cluster.internal.MiscMessageSerializer"
- typed-sharding = "akka.typed.cluster.sharding.internal.ShardingSerializer"
- }
- serialization-identifiers {
- "akka.typed.cluster.internal.MiscMessageSerializer" = 24
- "akka.typed.cluster.sharding.internal.ShardingSerializer" = 25
- }
serialization-bindings {
- "akka.typed.ActorRef" = typed-misc
- "akka.typed.internal.adapter.ActorRefAdapter" = typed-misc
- "akka.typed.cluster.sharding.ShardingEnvelope" = typed-sharding
+ "akka.actor.typed.ActorRef" = typed-misc
+ "akka.actor.typed.internal.adapter.ActorRefAdapter" = typed-misc
}
}
diff --git a/akka-typed/src/main/scala/akka/typed/ActorContext.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/ActorContext.scala
similarity index 95%
rename from akka-typed/src/main/scala/akka/typed/ActorContext.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/ActorContext.scala
index 5f69d92a70..64c7ffcded 100644
--- a/akka-typed/src/main/scala/akka/typed/ActorContext.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/ActorContext.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import akka.annotation.DoNotInherit
import akka.annotation.ApiMayChange
diff --git a/akka-typed/src/main/scala/akka/typed/ActorRef.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/ActorRef.scala
similarity index 96%
rename from akka-typed/src/main/scala/akka/typed/ActorRef.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/ActorRef.scala
index cc0ddcd1a2..c67800e72f 100644
--- a/akka-typed/src/main/scala/akka/typed/ActorRef.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/ActorRef.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import akka.{ actor ⇒ a }
@@ -82,6 +82,6 @@ object ActorRef {
def apply[T](send: (T, internal.FunctionRef[T]) ⇒ Unit, terminate: internal.FunctionRef[T] ⇒ Unit): ActorRef[T] =
new internal.FunctionRef(FunctionPath, send, terminate)
- private[typed] val FuturePath = a.RootActorPath(a.Address("akka.typed.internal", "future"))
- private[typed] val FunctionPath = a.RootActorPath(a.Address("akka.typed.internal", "function"))
+ private[typed] val FuturePath = a.RootActorPath(a.Address("akka.actor.typed.internal", "future"))
+ private[typed] val FunctionPath = a.RootActorPath(a.Address("akka.actor.typed.internal", "function"))
}
diff --git a/akka-typed/src/main/scala/akka/typed/ActorSystem.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/ActorSystem.scala
similarity index 96%
rename from akka-typed/src/main/scala/akka/typed/ActorSystem.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/ActorSystem.scala
index 133fcf5a81..b5d17f01e1 100644
--- a/akka-typed/src/main/scala/akka/typed/ActorSystem.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/ActorSystem.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import scala.concurrent.ExecutionContext
import akka.{ actor ⇒ a, event ⇒ e }
@@ -11,13 +11,14 @@ import akka.actor.setup.ActorSystemSetup
import com.typesafe.config.{ Config, ConfigFactory }
import scala.concurrent.{ ExecutionContextExecutor, Future }
-import akka.typed.internal.adapter.{ ActorSystemAdapter, PropsAdapter }
+import akka.actor.typed.internal.adapter.{ ActorSystemAdapter, PropsAdapter }
import akka.util.Timeout
import akka.annotation.DoNotInherit
import akka.annotation.ApiMayChange
import java.util.Optional
-import akka.typed.receptionist.Receptionist
+import akka.actor.typed.receptionist.Receptionist
+import akka.typed.EventStream
/**
* An ActorSystem is home to a hierarchy of Actors. It is created using
@@ -47,9 +48,9 @@ abstract class ActorSystem[-T] extends ActorRef[T] with Extensions { this: inter
def logConfiguration(): Unit
/**
- * A reference to this system’s logFilter, which filters usage of the [[#log]]
+ * A reference to this system’s logFilter, which filters usage of the [[log]]
* [[akka.event.LoggingAdapter]] such that only permissible messages are sent
- * via the [[#eventStream]]. The default implementation will just test that
+ * via the [[eventStream]]. The default implementation will just test that
* the message is suitable for the current log level.
*/
def logFilter: e.LoggingFilter
@@ -138,7 +139,7 @@ abstract class ActorSystem[-T] extends ActorRef[T] with Extensions { this: inter
* Ask the system guardian of this system to create an actor from the given
* behavior and props and with the given name. The name does not need to
* be unique since the guardian will prefix it with a running number when
- * creating the child actor. The timeout sets the timeout used for the [[akka.typed.scaladsl.AskPattern$]]
+ * creating the child actor. The timeout sets the timeout used for the [[akka.actor.typed.scaladsl.AskPattern$]]
* invocation when asking the guardian.
*
* The returned Future of [[ActorRef]] may be converted into an [[ActorRef]]
@@ -148,7 +149,7 @@ abstract class ActorSystem[-T] extends ActorRef[T] with Extensions { this: inter
def systemActorOf[U](behavior: Behavior[U], name: String, props: Props = Props.empty)(implicit timeout: Timeout): Future[ActorRef[U]]
/**
- * Return a reference to this system’s [[akka.typed.receptionist.Receptionist]].
+ * Return a reference to this system’s [[akka.actor.typed.receptionist.Receptionist]].
*/
def receptionist: ActorRef[Receptionist.Command] =
Receptionist(this).ref
diff --git a/akka-typed/src/main/scala/akka/typed/Behavior.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/Behavior.scala
similarity index 97%
rename from akka-typed/src/main/scala/akka/typed/Behavior.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/Behavior.scala
index f765418f22..d659edec2a 100644
--- a/akka-typed/src/main/scala/akka/typed/Behavior.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/Behavior.scala
@@ -1,14 +1,14 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import akka.actor.InvalidMessageException
import scala.annotation.tailrec
import akka.util.LineNumbers
import akka.annotation.{ DoNotInherit, InternalApi }
-import akka.typed.scaladsl.{ ActorContext ⇒ SAC }
+import akka.actor.typed.scaladsl.{ ActorContext ⇒ SAC }
import akka.util.OptionVal
/**
@@ -19,7 +19,7 @@ import akka.util.OptionVal
* its child actors.
*
* Behaviors can be formulated in a number of different ways, either by
- * using the DSLs in [[akka.typed.scaladsl.Actor]] and [[akka.typed.javadsl.Actor]]
+ * using the DSLs in [[akka.actor.typed.scaladsl.Actor]] and [[akka.actor.typed.javadsl.Actor]]
* or extending the abstract [[ExtensibleBehavior]] class.
*
* Closing over ActorContext makes a Behavior immobile: it cannot be moved to
@@ -42,7 +42,7 @@ sealed abstract class Behavior[T] {
/**
* Extension point for implementing custom behaviors in addition to the existing
- * set of behaviors available through the DSLs in [[akka.typed.scaladsl.Actor]] and [[akka.typed.javadsl.Actor]]
+ * set of behaviors available through the DSLs in [[akka.actor.typed.scaladsl.Actor]] and [[akka.actor.typed.javadsl.Actor]]
*/
abstract class ExtensibleBehavior[T] extends Behavior[T] {
/**
diff --git a/akka-typed/src/main/scala/akka/typed/Dispatchers.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/Dispatchers.scala
similarity index 95%
rename from akka-typed/src/main/scala/akka/typed/Dispatchers.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/Dispatchers.scala
index 70add77607..24477f6862 100644
--- a/akka-typed/src/main/scala/akka/typed/Dispatchers.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/Dispatchers.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import scala.concurrent.ExecutionContextExecutor
diff --git a/akka-typed/src/main/scala/akka/typed/Extensions.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/Extensions.scala
similarity index 99%
rename from akka-typed/src/main/scala/akka/typed/Extensions.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/Extensions.scala
index 2fdc2914db..d0f4b313aa 100644
--- a/akka-typed/src/main/scala/akka/typed/Extensions.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/Extensions.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import akka.annotation.DoNotInherit
diff --git a/akka-typed/src/main/scala/akka/typed/MessageAndSignals.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/MessageAndSignals.scala
similarity index 96%
rename from akka-typed/src/main/scala/akka/typed/MessageAndSignals.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/MessageAndSignals.scala
index e04e6a6844..9133d32c0a 100644
--- a/akka-typed/src/main/scala/akka/typed/MessageAndSignals.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/MessageAndSignals.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
/**
* Envelope that is published on the eventStream for every message that is
@@ -57,7 +57,7 @@ final case object PostStop extends PostStop {
/**
* Lifecycle signal that is fired when an Actor that was watched has terminated.
* Watching is performed by invoking the
- * [[akka.typed.ActorContext]] `watch` method. The DeathWatch service is
+ * [[akka.actor.typed.ActorContext]] `watch` method. The DeathWatch service is
* idempotent, meaning that registering twice has the same effect as registering
* once. Registration does not need to happen before the Actor terminates, a
* notification is guaranteed to arrive after both registration and termination
diff --git a/akka-typed/src/main/scala/akka/typed/Props.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/Props.scala
similarity index 99%
rename from akka-typed/src/main/scala/akka/typed/Props.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/Props.scala
index fcaa9bba97..2b38d76f23 100644
--- a/akka-typed/src/main/scala/akka/typed/Props.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/Props.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import java.util.concurrent.Executor
diff --git a/akka-typed/src/main/scala/akka/typed/SupervisorStrategy.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/SupervisorStrategy.scala
similarity index 99%
rename from akka-typed/src/main/scala/akka/typed/SupervisorStrategy.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/SupervisorStrategy.scala
index 86d04177d1..231fa676db 100644
--- a/akka-typed/src/main/scala/akka/typed/SupervisorStrategy.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/SupervisorStrategy.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
import akka.annotation.InternalApi
import scala.concurrent.duration.FiniteDuration
diff --git a/akka-typed/src/main/scala/akka/typed/internal/ActorCell.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorCell.scala
similarity index 99%
rename from akka-typed/src/main/scala/akka/typed/internal/ActorCell.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorCell.scala
index 845c1b9620..0627d5c216 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/ActorCell.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorCell.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.actor.{ Cancellable, InvalidActorNameException, InvalidMessageException }
@@ -20,9 +20,9 @@ import scala.util.control.NonFatal
import scala.util.control.Exception.Catcher
import akka.event.Logging.Error
import akka.event.Logging
-import akka.typed.Behavior.StoppedBehavior
+import akka.actor.typed.Behavior.StoppedBehavior
import akka.util.OptionVal
-import akka.typed.Behavior.UntypedBehavior
+import akka.actor.typed.Behavior.UntypedBehavior
/**
* INTERNAL API
diff --git a/akka-typed/src/main/scala/akka/typed/internal/ActorContextImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorContextImpl.scala
similarity index 77%
rename from akka-typed/src/main/scala/akka/typed/internal/ActorContextImpl.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorContextImpl.scala
index ff03f7bd6a..69a5bd2a91 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/ActorContextImpl.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorContextImpl.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.annotation.InternalApi
@@ -24,7 +24,7 @@ import scala.concurrent.ExecutionContextExecutor
case None ⇒ Optional.empty()
}
- override def getChildren: java.util.List[akka.typed.ActorRef[Void]] = {
+ override def getChildren: java.util.List[akka.actor.typed.ActorRef[Void]] = {
val c = children
val a = new ArrayList[ActorRef[Void]](c.size)
val i = c.iterator
@@ -38,16 +38,16 @@ import scala.concurrent.ExecutionContextExecutor
override def getMailboxCapacity: Int =
mailboxCapacity
- override def getSelf: akka.typed.ActorRef[T] =
+ override def getSelf: akka.actor.typed.ActorRef[T] =
self
- override def getSystem: akka.typed.ActorSystem[Void] =
+ override def getSystem: akka.actor.typed.ActorSystem[Void] =
system.asInstanceOf[ActorSystem[Void]]
- override def spawn[U](behavior: akka.typed.Behavior[U], name: String): akka.typed.ActorRef[U] =
+ override def spawn[U](behavior: akka.actor.typed.Behavior[U], name: String): akka.actor.typed.ActorRef[U] =
spawn(behavior, name, Props.empty)
- override def spawnAnonymous[U](behavior: akka.typed.Behavior[U]): akka.typed.ActorRef[U] =
+ override def spawnAnonymous[U](behavior: akka.actor.typed.Behavior[U]): akka.actor.typed.ActorRef[U] =
spawnAnonymous(behavior, Props.empty)
override def spawnAdapter[U](f: U ⇒ T, name: String): ActorRef[U] =
@@ -56,10 +56,10 @@ import scala.concurrent.ExecutionContextExecutor
override def spawnAdapter[U](f: U ⇒ T): ActorRef[U] =
internalSpawnAdapter(f, "")
- override def spawnAdapter[U](f: java.util.function.Function[U, T]): akka.typed.ActorRef[U] =
+ override def spawnAdapter[U](f: java.util.function.Function[U, T]): akka.actor.typed.ActorRef[U] =
internalSpawnAdapter(f.apply _, "")
- override def spawnAdapter[U](f: java.util.function.Function[U, T], name: String): akka.typed.ActorRef[U] =
+ override def spawnAdapter[U](f: java.util.function.Function[U, T], name: String): akka.actor.typed.ActorRef[U] =
internalSpawnAdapter(f.apply _, name)
/**
diff --git a/akka-typed/src/main/scala/akka/typed/internal/ActorRefImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorRefImpl.scala
similarity index 97%
rename from akka-typed/src/main/scala/akka/typed/internal/ActorRefImpl.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorRefImpl.scala
index 34afd94656..05e4420b59 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/ActorRefImpl.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorRefImpl.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.{ actor ⇒ a }
@@ -72,7 +72,7 @@ private[typed] class LocalActorRef[-T](override val path: a.ActorPath, cell: Act
*/
private[typed] object BlackholeActorRef
extends ActorRef[Any] with ActorRefImpl[Any] {
- override val path: a.ActorPath = a.RootActorPath(a.Address("akka.typed.internal", "blackhole"))
+ override val path: a.ActorPath = a.RootActorPath(a.Address("akka.actor.typed.internal", "blackhole"))
override def tell(msg: Any): Unit = ()
override def sendSystem(signal: SystemMessage): Unit = ()
final override def isLocal: Boolean = true
@@ -83,7 +83,7 @@ private[typed] object BlackholeActorRef
* This reference can be watched and will do the right thing when it receives a [[DeathWatchNotification]].
* This reference cannot watch other references.
*/
-private[typed] final class FunctionRef[-T](
+private[akka] final class FunctionRef[-T](
_path: a.ActorPath,
send: (T, FunctionRef[T]) ⇒ Unit,
_terminate: FunctionRef[T] ⇒ Unit)
@@ -228,7 +228,7 @@ private[typed] class FutureRef[-T](_path: a.ActorPath, bufferSize: Int, f: Futur
private[typed] object FutureRef {
val targetOffset = {
val fields = classOf[FutureRef[_]].getDeclaredFields.toList
- // On Scala 2.12, the field's name is exactly "_target" (and it's private), earlier Scala versions compile the val to a public field that's name mangled to "akka$typed$internal$FutureRef$$_target"
+ // On Scala 2.12, the field's name is exactly "_target" (and it's private), earlier Scala versions compile the val to a public field that's name mangled to "akka.actor.typed$internal$FutureRef$$_target"
val targetField = fields.find(_.getName.endsWith("_target"))
assert(targetField.nonEmpty, s"Could not find _target field in FutureRef class among fields $fields.")
diff --git a/akka-typed/src/main/scala/akka/typed/internal/ActorSystemImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorSystemImpl.scala
similarity index 98%
rename from akka-typed/src/main/scala/akka/typed/internal/ActorSystemImpl.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorSystemImpl.scala
index 62e5d0b57a..3e421a1a50 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/ActorSystemImpl.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorSystemImpl.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import com.typesafe.config.Config
@@ -15,7 +15,7 @@ import akka.{ actor ⇒ a, dispatch ⇒ d, event ⇒ e }
import scala.util.control.NonFatal
import scala.util.control.ControlThrowable
import scala.collection.immutable
-import akka.typed.Dispatchers
+import akka.actor.typed.Dispatchers
import scala.concurrent.Promise
import java.util.concurrent.ConcurrentSkipListSet
@@ -27,8 +27,9 @@ import akka.util.Timeout
import java.io.Closeable
import java.util.concurrent.atomic.AtomicInteger
-import akka.typed.receptionist.Receptionist
-import akka.typed.scaladsl.AskPattern
+import akka.actor.typed.receptionist.Receptionist
+import akka.actor.typed.scaladsl.AskPattern
+import akka.typed.{ BusLogging, EventStream }
object ActorSystemImpl {
@@ -288,7 +289,7 @@ private[typed] class ActorSystemImpl[-T](
val children = cell.children.toSeq.sorted
val bulk = children.dropRight(1) map (r ⇒ printNode(r.sorryForNothing, indent + " |"))
terminating ++ bulk ++ (children.lastOption map (r ⇒ printNode(r.sorryForNothing, indent + " ")))
- } mkString ("\n"))
+ } mkString "\n")
case _ ⇒
indent + node.path.name + " " + e.Logging.simpleName(node)
}
diff --git a/akka-typed/src/main/scala/akka/typed/internal/BehaviorImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/BehaviorImpl.scala
similarity index 95%
rename from akka-typed/src/main/scala/akka/typed/internal/BehaviorImpl.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/BehaviorImpl.scala
index 11571afcfe..e9683c18b5 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/BehaviorImpl.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/BehaviorImpl.scala
@@ -1,15 +1,15 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.actor.InvalidMessageException
import akka.util.LineNumbers
import akka.annotation.InternalApi
-import akka.typed.{ ActorContext ⇒ AC }
-import akka.typed.scaladsl.{ ActorContext ⇒ SAC }
-import akka.typed.scaladsl.Actor
+import akka.actor.typed.{ ActorContext ⇒ AC }
+import akka.actor.typed.scaladsl.{ ActorContext ⇒ SAC }
+import akka.actor.typed.scaladsl.Actor
import scala.reflect.ClassTag
import scala.annotation.tailrec
@@ -31,7 +31,7 @@ import scala.annotation.tailrec
behavior match {
case d: DeferredBehavior[T] ⇒
DeferredBehavior[U] { ctx ⇒
- val c = ctx.asInstanceOf[akka.typed.ActorContext[T]]
+ val c = ctx.asInstanceOf[akka.actor.typed.ActorContext[T]]
val b = Behavior.validateAsInitial(Behavior.undefer(d, c))
Widened(b, matcher)
}
@@ -120,7 +120,7 @@ import scala.annotation.tailrec
behavior match {
case d: DeferredBehavior[T] ⇒
DeferredBehavior[T] { ctx ⇒
- val c = ctx.asInstanceOf[akka.typed.ActorContext[T]]
+ val c = ctx.asInstanceOf[akka.actor.typed.ActorContext[T]]
val b = Behavior.validateAsInitial(Behavior.undefer(d, c))
Intercept(beforeMessage, beforeSignal, afterMessage, afterSignal, b, toStringPrefix)
}
diff --git a/akka-typed/src/main/scala/akka/typed/internal/DeathWatch.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/DeathWatch.scala
similarity index 99%
rename from akka-typed/src/main/scala/akka/typed/internal/DeathWatch.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/DeathWatch.scala
index 90fcfd865e..5c38032358 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/DeathWatch.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/DeathWatch.scala
@@ -2,7 +2,7 @@
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.event.Logging.{ Warning, Debug }
diff --git a/akka-typed/src/main/scala/akka/typed/internal/DispatchersImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/DispatchersImpl.scala
similarity index 99%
rename from akka-typed/src/main/scala/akka/typed/internal/DispatchersImpl.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/DispatchersImpl.scala
index 6f2ec355be..9116388c58 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/DispatchersImpl.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/DispatchersImpl.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import scala.concurrent.ExecutionContextExecutor
diff --git a/akka-typed/src/main/scala/akka/typed/internal/EventStreamImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/EventStreamImpl.scala
similarity index 98%
rename from akka-typed/src/main/scala/akka/typed/internal/EventStreamImpl.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/EventStreamImpl.scala
index 248b6f216e..dd097015a4 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/EventStreamImpl.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/EventStreamImpl.scala
@@ -1,18 +1,22 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import akka.{ actor ⇒ a, event ⇒ e }
import java.util.concurrent.atomic.AtomicReference
+
import scala.annotation.tailrec
import scala.concurrent.{ Await, Promise }
import akka.util.{ ReentrantGuard, Subclassification, SubclassifiedIndex }
+
import scala.collection.immutable
import java.util.concurrent.TimeoutException
+
import akka.util.Timeout
-import akka.typed.scaladsl.AskPattern
+import akka.actor.typed.scaladsl.AskPattern
+import akka.typed.{ EventStream, Logger }
/**
* INTERNAL API
@@ -330,6 +334,6 @@ private[typed] object EventStreamImpl {
def isSubclass(x: Class[_], y: Class[_]) = y isAssignableFrom x
}
- val StandardOutLoggerPath = a.RootActorPath(a.Address("akka.typed.internal", "StandardOutLogger"))
+ val StandardOutLoggerPath = a.RootActorPath(a.Address("akka.actor.typed.internal", "StandardOutLogger"))
}
diff --git a/akka-typed/src/main/scala/akka/typed/internal/ExtensionsImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ExtensionsImpl.scala
similarity index 96%
rename from akka-typed/src/main/scala/akka/typed/internal/ExtensionsImpl.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/ExtensionsImpl.scala
index 6c7c3e1dba..f6381691b7 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/ExtensionsImpl.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ExtensionsImpl.scala
@@ -1,12 +1,12 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.internal
+package akka.actor.typed.internal
import java.util.concurrent.{ ConcurrentHashMap, CountDownLatch }
import akka.annotation.InternalApi
-import akka.typed.{ ActorSystem, Extension, ExtensionId, Extensions }
+import akka.actor.typed.{ ActorSystem, Extension, ExtensionId, Extensions }
import scala.annotation.tailrec
import scala.util.{ Failure, Success, Try }
@@ -58,7 +58,7 @@ trait ExtensionsImpl extends Extensions { self: ActorSystem[_] ⇒
}
// eager initialization of CoordinatedShutdown
- // TODO coordinated shutdown for akka typed
+ // TODO coordinated shutdown for akka.actor.typed
// CoordinatedShutdown(self)
loadExtensions("akka.typed.library-extensions", throwOnLoadFail = true)
diff --git a/akka-typed/src/main/scala/akka/typed/internal/Restarter.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/Restarter.scala
similarity index 95%
rename from akka-typed/src/main/scala/akka/typed/internal/Restarter.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/Restarter.scala
index f233ffbc5d..bacc0fa8c0 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/Restarter.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/Restarter.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import java.util.concurrent.ThreadLocalRandom
@@ -16,16 +16,16 @@ import scala.util.control.NonFatal
import akka.actor.DeadLetterSuppression
import akka.annotation.InternalApi
import akka.event.Logging
-import akka.typed.ActorContext
-import akka.typed.Behavior
-import akka.typed.Behavior.DeferredBehavior
-import akka.typed.ExtensibleBehavior
-import akka.typed.PreRestart
-import akka.typed.Signal
-import akka.typed.SupervisorStrategy._
-import akka.typed.scaladsl.Actor._
+import akka.actor.typed.ActorContext
+import akka.actor.typed.Behavior
+import akka.actor.typed.Behavior.DeferredBehavior
+import akka.actor.typed.ExtensibleBehavior
+import akka.actor.typed.PreRestart
+import akka.actor.typed.Signal
+import akka.actor.typed.SupervisorStrategy._
+import akka.actor.typed.scaladsl.Actor._
import akka.util.OptionVal
-import akka.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.Actor
/**
* INTERNAL API
@@ -33,7 +33,7 @@ import akka.typed.scaladsl.Actor
@InternalApi private[akka] object Restarter {
def apply[T, Thr <: Throwable: ClassTag](initialBehavior: Behavior[T], strategy: SupervisorStrategy): Behavior[T] =
Actor.deferred[T] { ctx ⇒
- val c = ctx.asInstanceOf[akka.typed.ActorContext[T]]
+ val c = ctx.asInstanceOf[akka.actor.typed.ActorContext[T]]
val startedBehavior = initialUndefer(c, initialBehavior)
strategy match {
case Restart(-1, _, loggingEnabled) ⇒
diff --git a/akka-typed/src/main/scala/akka/typed/internal/SupervisionMechanics.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/SupervisionMechanics.scala
similarity index 96%
rename from akka-typed/src/main/scala/akka/typed/internal/SupervisionMechanics.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/SupervisionMechanics.scala
index fb9d72df37..ea795ab3a1 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/SupervisionMechanics.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/SupervisionMechanics.scala
@@ -1,13 +1,13 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import scala.util.control.NonFatal
import akka.event.Logging
-import akka.typed.Behavior.{ DeferredBehavior, undefer, validateAsInitial }
-import akka.typed.Behavior.StoppedBehavior
+import akka.actor.typed.Behavior.{ DeferredBehavior, undefer, validateAsInitial }
+import akka.actor.typed.Behavior.StoppedBehavior
import akka.util.OptionVal
/**
diff --git a/akka-typed/src/main/scala/akka/typed/internal/SystemMessage.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/SystemMessage.scala
similarity index 98%
rename from akka-typed/src/main/scala/akka/typed/internal/SystemMessage.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/SystemMessage.scala
index 3a2ad8fb20..f5a411f527 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/SystemMessage.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/SystemMessage.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import scala.annotation.tailrec
@@ -183,7 +183,7 @@ private[typed] class EarliestFirstSystemMessageList(val head: SystemMessage) ext
*
* NEVER SEND THE SAME SYSTEM MESSAGE OBJECT TO TWO ACTORS
*/
-private[typed] sealed trait SystemMessage extends Serializable {
+private[akka] sealed trait SystemMessage extends Serializable {
// Next fields are only modifiable via the SystemMessageList value class
@transient
private[internal] var next: SystemMessage = _
diff --git a/akka-typed/src/main/scala/akka/typed/internal/TimerSchedulerImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/TimerSchedulerImpl.scala
similarity index 95%
rename from akka-typed/src/main/scala/akka/typed/internal/TimerSchedulerImpl.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/TimerSchedulerImpl.scala
index fb5551fbd8..5e573ba4ba 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/TimerSchedulerImpl.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/TimerSchedulerImpl.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
import scala.concurrent.duration.FiniteDuration
@@ -11,11 +11,11 @@ import akka.annotation.ApiMayChange
import akka.annotation.DoNotInherit
import akka.annotation.InternalApi
import akka.dispatch.ExecutionContexts
-import akka.typed.ActorRef
-import akka.typed.ActorRef.ActorRefOps
-import akka.typed.javadsl
-import akka.typed.scaladsl
-import akka.typed.scaladsl.ActorContext
+import akka.actor.typed.ActorRef
+import akka.actor.typed.ActorRef.ActorRefOps
+import akka.actor.typed.javadsl
+import akka.actor.typed.scaladsl
+import akka.actor.typed.scaladsl.ActorContext
import scala.reflect.ClassTag
/**
diff --git a/akka-typed/src/main/scala/akka/typed/internal/adapter/ActorAdapter.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorAdapter.scala
similarity index 99%
rename from akka-typed/src/main/scala/akka/typed/internal/adapter/ActorAdapter.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorAdapter.scala
index 9056334ade..64d298cf75 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/adapter/ActorAdapter.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorAdapter.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
package adapter
diff --git a/akka-typed/src/main/scala/akka/typed/internal/adapter/ActorContextAdapter.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorContextAdapter.scala
similarity index 95%
rename from akka-typed/src/main/scala/akka/typed/internal/adapter/ActorContextAdapter.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorContextAdapter.scala
index 6629ddc02f..ee24411f5d 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/adapter/ActorContextAdapter.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorContextAdapter.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
package adapter
@@ -9,12 +9,12 @@ import akka.{ actor ⇒ a }
import scala.concurrent.duration._
import scala.concurrent.ExecutionContextExecutor
import akka.annotation.InternalApi
-import akka.typed.Behavior.UntypedBehavior
+import akka.actor.typed.Behavior.UntypedBehavior
/**
* INTERNAL API. Wrapping an [[akka.actor.ActorContext]] as an [[ActorContext]].
*/
-@InternalApi private[typed] class ActorContextAdapter[T](val untyped: a.ActorContext) extends ActorContextImpl[T] {
+@InternalApi private[akka] class ActorContextAdapter[T](val untyped: a.ActorContext) extends ActorContextImpl[T] {
import ActorRefAdapter.toUntyped
diff --git a/akka-typed/src/main/scala/akka/typed/internal/adapter/ActorRefAdapter.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorRefAdapter.scala
similarity index 96%
rename from akka-typed/src/main/scala/akka/typed/internal/adapter/ActorRefAdapter.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorRefAdapter.scala
index e823fd0fc6..acccd800b0 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/adapter/ActorRefAdapter.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorRefAdapter.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
package adapter
@@ -26,7 +26,7 @@ import akka.dispatch.sysmsg
ActorRefAdapter.sendSystemMessage(untyped, signal)
}
-private[typed] object ActorRefAdapter {
+private[akka] object ActorRefAdapter {
def apply[T](untyped: a.ActorRef): ActorRef[T] = new ActorRefAdapter(untyped.asInstanceOf[a.InternalActorRef])
def toUntyped[U](ref: ActorRef[U]): akka.actor.InternalActorRef =
diff --git a/akka-typed/src/main/scala/akka/typed/internal/adapter/ActorSystemAdapter.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorSystemAdapter.scala
similarity index 92%
rename from akka-typed/src/main/scala/akka/typed/internal/adapter/ActorSystemAdapter.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorSystemAdapter.scala
index 8cab131876..7f5444679f 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/adapter/ActorSystemAdapter.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/ActorSystemAdapter.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
package adapter
@@ -13,6 +13,7 @@ import akka.util.Timeout
import scala.concurrent.Future
import akka.annotation.InternalApi
+import akka.typed.EventStream
/**
* INTERNAL API. Lightweight wrapper for presenting an untyped ActorSystem to a Behavior (via the context).
@@ -21,12 +22,12 @@ import akka.annotation.InternalApi
* a longer time; in all other cases the wrapper will just be spawned for a single call in
* most circumstances.
*/
-@InternalApi private[typed] class ActorSystemAdapter[-T](val untyped: a.ActorSystemImpl)
+@InternalApi private[akka] class ActorSystemAdapter[-T](val untyped: a.ActorSystemImpl)
extends ActorSystem[T] with ActorRef[T] with internal.ActorRefImpl[T] with ExtensionsImpl {
import ActorRefAdapter.sendSystemMessage
- // Members declared in akka.typed.ActorRef
+ // Members declared in akka.actor.typed.ActorRef
override def tell(msg: T): Unit = {
if (msg == null) throw new InvalidMessageException("[null] is not an allowed message")
untyped.guardian ! msg
@@ -37,7 +38,7 @@ import akka.annotation.InternalApi
override def toString: String = untyped.toString
- // Members declared in akka.typed.ActorSystem
+ // Members declared in akka.actor.typed.ActorSystem
override def deadLetters[U]: ActorRef[U] = ActorRefAdapter(untyped.deadLetters)
override def dispatchers: Dispatchers = new Dispatchers {
override def lookup(selector: DispatcherSelector): ExecutionContextExecutor =
@@ -67,9 +68,9 @@ import akka.annotation.InternalApi
import akka.dispatch.ExecutionContexts.sameThreadExecutionContext
- override def terminate(): scala.concurrent.Future[akka.typed.Terminated] =
+ override def terminate(): scala.concurrent.Future[akka.actor.typed.Terminated] =
untyped.terminate().map(t ⇒ Terminated(ActorRefAdapter(t.actor))(null))(sameThreadExecutionContext)
- override lazy val whenTerminated: scala.concurrent.Future[akka.typed.Terminated] =
+ override lazy val whenTerminated: scala.concurrent.Future[akka.actor.typed.Terminated] =
untyped.whenTerminated.map(t ⇒ Terminated(ActorRefAdapter(t.actor))(null))(sameThreadExecutionContext)
def systemActorOf[U](behavior: Behavior[U], name: String, props: Props)(implicit timeout: Timeout): Future[ActorRef[U]] = {
@@ -79,7 +80,7 @@ import akka.annotation.InternalApi
}
-private[typed] object ActorSystemAdapter {
+private[akka] object ActorSystemAdapter {
def apply(untyped: a.ActorSystem): ActorSystem[Nothing] = AdapterExtension(untyped).adapter
// to make sure we do never create more than one adapter for the same actor system
diff --git a/akka-typed/src/main/scala/akka/typed/internal/adapter/EventStreamAdapter.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/EventStreamAdapter.scala
similarity index 96%
rename from akka-typed/src/main/scala/akka/typed/internal/adapter/EventStreamAdapter.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/EventStreamAdapter.scala
index 91fb378b06..71bf554f2b 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/adapter/EventStreamAdapter.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/EventStreamAdapter.scala
@@ -1,12 +1,13 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
package adapter
import akka.{ event ⇒ e }
import akka.annotation.InternalApi
+import akka.typed.EventStream
/**
* INTERNAL API
diff --git a/akka-typed/src/main/scala/akka/typed/internal/adapter/PropsAdapter.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/PropsAdapter.scala
similarity index 76%
rename from akka-typed/src/main/scala/akka/typed/internal/adapter/PropsAdapter.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/PropsAdapter.scala
index a3a4d60f9d..f9d15cf69b 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/adapter/PropsAdapter.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/PropsAdapter.scala
@@ -1,13 +1,13 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package internal
package adapter
-import akka.typed.Behavior
-import akka.typed.EmptyProps
-import akka.typed.Props
+import akka.actor.typed.Behavior
+import akka.actor.typed.EmptyProps
+import akka.actor.typed.Props
import akka.annotation.InternalApi
/**
diff --git a/akka-typed/src/main/scala/akka/typed/internal/receptionist/ReceptionistImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/receptionist/ReceptionistImpl.scala
similarity index 90%
rename from akka-typed/src/main/scala/akka/typed/internal/receptionist/ReceptionistImpl.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/internal/receptionist/ReceptionistImpl.scala
index 34f8800077..a0869a806d 100644
--- a/akka-typed/src/main/scala/akka/typed/internal/receptionist/ReceptionistImpl.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/receptionist/ReceptionistImpl.scala
@@ -1,34 +1,32 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.internal.receptionist
+package akka.actor.typed.internal.receptionist
import akka.annotation.InternalApi
-import akka.typed.ActorRef
-import akka.typed.Behavior
-import akka.typed.Terminated
-import akka.typed.receptionist.Receptionist._
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.Actor.immutable
-import akka.typed.scaladsl.Actor.same
-import akka.typed.scaladsl.ActorContext
+import akka.actor.typed.ActorRef
+import akka.actor.typed.Behavior
+import akka.actor.typed.Terminated
+import akka.actor.typed.receptionist.Receptionist._
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.Actor.immutable
+import akka.actor.typed.scaladsl.Actor.same
+import akka.actor.typed.scaladsl.ActorContext
import akka.util.TypedMultiMap
-import scala.reflect.ClassTag
-
/**
* Marker interface to use with dynamic access
*
* Internal API
*/
@InternalApi
-private[typed] trait ReceptionistBehaviorProvider {
+private[akka] trait ReceptionistBehaviorProvider {
def behavior: Behavior[Command]
}
/** Internal API */
@InternalApi
-private[typed] object ReceptionistImpl extends ReceptionistBehaviorProvider {
+private[akka] object ReceptionistImpl extends ReceptionistBehaviorProvider {
// FIXME: make sure to provide serializer
final case class DefaultServiceKey[T](id: String, typeName: String) extends ServiceKey[T] {
override def toString: String = s"ServiceKey[$typeName]($id)"
@@ -63,7 +61,7 @@ private[typed] object ReceptionistImpl extends ReceptionistBehaviorProvider {
type SubscriptionsKV[K <: AbstractServiceKey] = ActorRef[Listing[K#Protocol]]
type SubscriptionRegistry = TypedMultiMap[AbstractServiceKey, SubscriptionsKV]
- private[typed] def init(externalInterfaceFactory: ActorContext[AllCommands] ⇒ ExternalInterface): Behavior[Command] =
+ private[akka] def init(externalInterfaceFactory: ActorContext[AllCommands] ⇒ ExternalInterface): Behavior[Command] =
Actor.deferred[AllCommands] { ctx ⇒
val externalInterface = externalInterfaceFactory(ctx)
behavior(
diff --git a/akka-typed/src/main/scala/akka/typed/javadsl/Actor.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/Actor.scala
similarity index 92%
rename from akka-typed/src/main/scala/akka/typed/javadsl/Actor.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/Actor.scala
index 421983b9d2..7c905aed84 100644
--- a/akka-typed/src/main/scala/akka/typed/javadsl/Actor.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/Actor.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.javadsl
+package akka.actor.typed.javadsl
import java.util.function.{ Function ⇒ JFunction }
@@ -12,16 +12,16 @@ import akka.japi.function.{ Function2 ⇒ JapiFunction2 }
import akka.japi.function.{ Procedure, Procedure2 }
import akka.japi.pf.PFBuilder
-import akka.typed.Behavior
-import akka.typed.ExtensibleBehavior
-import akka.typed.Signal
-import akka.typed.ActorRef
-import akka.typed.SupervisorStrategy
-import akka.typed.scaladsl.{ ActorContext ⇒ SAC }
+import akka.actor.typed.Behavior
+import akka.actor.typed.ExtensibleBehavior
+import akka.actor.typed.Signal
+import akka.actor.typed.ActorRef
+import akka.actor.typed.SupervisorStrategy
+import akka.actor.typed.scaladsl.{ ActorContext ⇒ SAC }
-import akka.typed.internal.BehaviorImpl
-import akka.typed.internal.Restarter
-import akka.typed.internal.TimerSchedulerImpl
+import akka.actor.typed.internal.BehaviorImpl
+import akka.actor.typed.internal.Restarter
+import akka.actor.typed.internal.TimerSchedulerImpl
object Actor {
@@ -79,11 +79,11 @@ object Actor {
}
@throws(classOf[Exception])
- override final def receiveMessage(ctx: akka.typed.ActorContext[T], msg: T): Behavior[T] =
+ override final def receiveMessage(ctx: akka.actor.typed.ActorContext[T], msg: T): Behavior[T] =
receive.receiveMessage(msg)
@throws(classOf[Exception])
- override final def receiveSignal(ctx: akka.typed.ActorContext[T], msg: Signal): Behavior[T] =
+ override final def receiveSignal(ctx: akka.actor.typed.ActorContext[T], msg: Signal): Behavior[T] =
receive.receiveSignal(msg)
def createReceive: Receive[T]
@@ -142,7 +142,7 @@ object Actor {
/**
* Construct an actor behavior that can react to incoming messages but not to
* lifecycle signals. After spawning this actor from another actor (or as the
- * guardian of an [[akka.typed.ActorSystem]]) it will be executed within an
+ * guardian of an [[akka.actor.typed.ActorSystem]]) it will be executed within an
* [[ActorContext]] that allows access to the system, spawning and watching
* other actors, etc.
*
@@ -158,7 +158,7 @@ object Actor {
/**
* Construct an actor behavior that can react to both incoming messages and
* lifecycle signals. After spawning this actor from another actor (or as the
- * guardian of an [[akka.typed.ActorSystem]]) it will be executed within an
+ * guardian of an [[akka.actor.typed.ActorSystem]]) it will be executed within an
* [[ActorContext]] that allows access to the system, spawning and watching
* other actors, etc.
*
@@ -217,7 +217,7 @@ object Actor {
/**
* Behavior decorator that copies all received message to the designated
- * monitor [[akka.typed.ActorRef]] before invoking the wrapped behavior. The
+ * monitor [[akka.actor.typed.ActorRef]] before invoking the wrapped behavior. The
* wrapped behavior can evolve (i.e. return different behavior) without needing to be
* wrapped in a `monitor` call again.
*/
@@ -263,7 +263,7 @@ object Actor {
* Only exceptions of the given type (and their subclasses) will be handled by this supervision behavior.
*/
def onFailure[Thr <: Throwable](clazz: Class[Thr], strategy: SupervisorStrategy): Behavior[T] =
- akka.typed.internal.Restarter(Behavior.validateAsInitial(wrapped), strategy)(ClassTag(clazz))
+ akka.actor.typed.internal.Restarter(Behavior.validateAsInitial(wrapped), strategy)(ClassTag(clazz))
/**
* Specify the [[SupervisorStrategy]] to be invoked when the wrapped behaior throws.
diff --git a/akka-typed/src/main/scala/akka/typed/javadsl/ActorContext.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/ActorContext.scala
similarity index 90%
rename from akka-typed/src/main/scala/akka/typed/javadsl/ActorContext.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/ActorContext.scala
index f774f85876..4ee557f2e8 100644
--- a/akka-typed/src/main/scala/akka/typed/javadsl/ActorContext.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/ActorContext.scala
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.javadsl
+package akka.actor.typed.javadsl
import java.util.function.{ Function ⇒ JFunction }
import akka.annotation.DoNotInherit
import akka.annotation.ApiMayChange
-import akka.typed.ActorRef
-import akka.typed.ActorSystem
+import akka.actor.typed.ActorRef
+import akka.actor.typed.ActorSystem
import java.util.Optional
-import akka.typed.Behavior
-import akka.typed.Props
+import akka.actor.typed.Behavior
+import akka.actor.typed.Props
import scala.concurrent.duration.FiniteDuration
import scala.concurrent.ExecutionContextExecutor
@@ -40,7 +40,7 @@ trait ActorContext[T] {
/**
* Get the `scaladsl` of this `ActorContext`.
*/
- def asScala: akka.typed.scaladsl.ActorContext[T]
+ def asScala: akka.actor.typed.scaladsl.ActorContext[T]
/**
* The identity of this Actor, bound to the lifecycle of this Actor instance.
@@ -71,24 +71,24 @@ trait ActorContext[T] {
def getChild(name: String): Optional[ActorRef[Void]]
/**
- * Create a child Actor from the given [[akka.typed.Behavior]] under a randomly chosen name.
+ * Create a child Actor from the given [[akka.actor.typed.Behavior]] under a randomly chosen name.
* It is good practice to name Actors wherever practical.
*/
def spawnAnonymous[U](behavior: Behavior[U]): ActorRef[U]
/**
- * Create a child Actor from the given [[akka.typed.Behavior]] under a randomly chosen name.
+ * Create a child Actor from the given [[akka.actor.typed.Behavior]] under a randomly chosen name.
* It is good practice to name Actors wherever practical.
*/
def spawnAnonymous[U](behavior: Behavior[U], props: Props): ActorRef[U]
/**
- * Create a child Actor from the given [[akka.typed.Behavior]] and with the given name.
+ * Create a child Actor from the given [[akka.actor.typed.Behavior]] and with the given name.
*/
def spawn[U](behavior: Behavior[U], name: String): ActorRef[U]
/**
- * Create a child Actor from the given [[akka.typed.Behavior]] and with the given name.
+ * Create a child Actor from the given [[akka.actor.typed.Behavior]] and with the given name.
*/
def spawn[U](behavior: Behavior[U], name: String, props: Props): ActorRef[U]
diff --git a/akka-typed/src/main/scala/akka/typed/javadsl/Adapter.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/Adapter.scala
similarity index 82%
rename from akka-typed/src/main/scala/akka/typed/javadsl/Adapter.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/Adapter.scala
index 40f6a780ab..e364fc3890 100644
--- a/akka-typed/src/main/scala/akka/typed/javadsl/Adapter.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/Adapter.scala
@@ -1,22 +1,22 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.javadsl
+package akka.actor.typed.javadsl
-import akka.typed.Behavior
-import akka.typed.Props
-import akka.typed.EmptyProps
-import akka.typed.ActorRef
-import akka.typed.internal.adapter.ActorRefAdapter
-import akka.typed.scaladsl.adapter._
-import akka.typed.ActorSystem
-import akka.typed.internal.adapter.ActorContextAdapter
+import akka.actor.typed.Behavior
+import akka.actor.typed.Props
+import akka.actor.typed.EmptyProps
+import akka.actor.typed.ActorRef
+import akka.actor.typed.internal.adapter.ActorRefAdapter
+import akka.actor.typed.scaladsl.adapter._
+import akka.actor.typed.ActorSystem
+import akka.actor.typed.internal.adapter.ActorContextAdapter
import akka.japi.Creator
/**
* Java API: Adapters between typed and untyped actors and actor systems.
* The underlying `ActorSystem` is the untyped [[akka.actor.ActorSystem]]
- * which runs Akka Typed [[akka.typed.Behavior]] on an emulation layer. In this
+ * which runs Akka Typed [[akka.actor.typed.Behavior]] on an emulation layer. In this
* system typed and untyped actors can coexist.
*
* These methods make it possible to create typed child actor from untyped
@@ -24,8 +24,8 @@ import akka.japi.Creator
* `watch` is also supported in both directions.
*
* There are also converters (`toTyped`, `toUntyped`) between untyped
- * [[akka.actor.ActorRef]] and typed [[akka.typed.ActorRef]], and between untyped
- * [[akka.actor.ActorSystem]] and typed [[akka.typed.ActorSystem]].
+ * [[akka.actor.ActorRef]] and typed [[akka.actor.typed.ActorRef]], and between untyped
+ * [[akka.actor.ActorSystem]] and typed [[akka.actor.typed.ActorSystem]].
*/
object Adapter {
@@ -90,7 +90,7 @@ object Adapter {
ref
/**
- * Wrap [[akka.typed.Behavior]] in an untyped [[akka.actor.Props]], i.e. when
+ * Wrap [[akka.actor.typed.Behavior]] in an untyped [[akka.actor.Props]], i.e. when
* spawning a typed child actor from an untyped parent actor.
* This is normally not needed because you can use the extension methods
* `spawn` and `spawnAnonymous` with an untyped `ActorContext`, but it's needed
@@ -99,10 +99,10 @@ object Adapter {
* example of that.
*/
def props[T](behavior: Creator[Behavior[T]], deploy: Props): akka.actor.Props =
- akka.typed.internal.adapter.PropsAdapter(() ⇒ behavior.create(), deploy)
+ akka.actor.typed.internal.adapter.PropsAdapter(() ⇒ behavior.create(), deploy)
/**
- * Wrap [[akka.typed.Behavior]] in an untyped [[akka.actor.Props]], i.e. when
+ * Wrap [[akka.actor.typed.Behavior]] in an untyped [[akka.actor.Props]], i.e. when
* spawning a typed child actor from an untyped parent actor.
* This is normally not needed because you can use the extension methods
* `spawn` and `spawnAnonymous` with an untyped `ActorContext`, but it's needed
diff --git a/akka-typed/src/main/scala/akka/typed/javadsl/Ask.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/Ask.scala
similarity index 94%
rename from akka-typed/src/main/scala/akka/typed/javadsl/Ask.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/Ask.scala
index 006b460fae..20fb9c5114 100644
--- a/akka-typed/src/main/scala/akka/typed/javadsl/Ask.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/Ask.scala
@@ -1,4 +1,4 @@
-package akka.typed
+package akka.actor.typed
package javadsl
import java.util.concurrent.CompletionStage
diff --git a/akka-typed/src/main/scala/akka/typed/javadsl/BehaviorBuilder.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/BehaviorBuilder.scala
similarity index 98%
rename from akka-typed/src/main/scala/akka/typed/javadsl/BehaviorBuilder.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/BehaviorBuilder.scala
index 5f398f285a..407cd81ca9 100644
--- a/akka-typed/src/main/scala/akka/typed/javadsl/BehaviorBuilder.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/BehaviorBuilder.scala
@@ -2,16 +2,16 @@
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.javadsl
+package akka.actor.typed.javadsl
import scala.annotation.tailrec
import akka.japi.function.{ Function, Function2, Predicate }
import akka.annotation.InternalApi
-import akka.typed
-import akka.typed.{ Behavior, ExtensibleBehavior, Signal }
+import akka.actor.typed
+import akka.actor.typed.{ Behavior, ExtensibleBehavior, Signal }
-import akka.typed.Behavior.unhandled
+import akka.actor.typed.Behavior.unhandled
import BehaviorBuilder._
diff --git a/akka-typed/src/main/scala/akka/typed/javadsl/ReceiveBuilder.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/ReceiveBuilder.scala
similarity index 98%
rename from akka-typed/src/main/scala/akka/typed/javadsl/ReceiveBuilder.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/ReceiveBuilder.scala
index 8da78e9a90..ef537c5247 100644
--- a/akka-typed/src/main/scala/akka/typed/javadsl/ReceiveBuilder.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/ReceiveBuilder.scala
@@ -2,12 +2,12 @@
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.javadsl
+package akka.actor.typed.javadsl
import scala.annotation.tailrec
import akka.japi.function.{ Creator, Function, Predicate }
-import akka.typed.javadsl.Actor.Receive
-import akka.typed.{ Behavior, Signal }
+import akka.actor.typed.javadsl.Actor.Receive
+import akka.actor.typed.{ Behavior, Signal }
import ReceiveBuilder._
import akka.annotation.InternalApi
diff --git a/akka-typed/src/main/scala/akka/typed/javadsl/TimerScheduler.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/TimerScheduler.scala
similarity index 98%
rename from akka-typed/src/main/scala/akka/typed/javadsl/TimerScheduler.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/TimerScheduler.scala
index 1412043a29..56aea99f64 100644
--- a/akka-typed/src/main/scala/akka/typed/javadsl/TimerScheduler.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/javadsl/TimerScheduler.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.javadsl
+package akka.actor.typed.javadsl
import scala.concurrent.duration.FiniteDuration
diff --git a/akka-typed/src/main/scala/akka/typed/package.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/package.scala
similarity index 57%
rename from akka-typed/src/main/scala/akka/typed/package.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/package.scala
index d4c5892886..c2d4d6ebef 100644
--- a/akka-typed/src/main/scala/akka/typed/package.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/package.scala
@@ -1,16 +1,16 @@
-package akka
+package akka.actor
-import akka.typed.internal.ActorRefImpl
+import akka.actor.typed.internal.ActorRefImpl
package object typed {
/*
* These are safe due to the self-type of ActorRef
*/
- private[typed] implicit class ToImpl[U](val ref: ActorRef[U]) extends AnyVal {
+ private[akka] implicit class ToImpl[U](val ref: ActorRef[U]) extends AnyVal {
def sorry: ActorRefImpl[U] = ref.asInstanceOf[ActorRefImpl[U]]
}
// This one is necessary because Scala refuses to infer Nothing
- private[typed] implicit class ToImplNothing(val ref: ActorRef[Nothing]) extends AnyVal {
+ private[akka] implicit class ToImplNothing(val ref: ActorRef[Nothing]) extends AnyVal {
def sorryForNothing: ActorRefImpl[Nothing] = ref.asInstanceOf[ActorRefImpl[Nothing]]
}
}
diff --git a/akka-typed/src/main/scala/akka/typed/receptionist/Receptionist.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/receptionist/Receptionist.scala
similarity index 88%
rename from akka-typed/src/main/scala/akka/typed/receptionist/Receptionist.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/receptionist/Receptionist.scala
index b90d3c57a2..521994485b 100644
--- a/akka-typed/src/main/scala/akka/typed/receptionist/Receptionist.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/receptionist/Receptionist.scala
@@ -1,15 +1,15 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.receptionist
+package akka.actor.typed.receptionist
import akka.annotation.InternalApi
-import akka.typed.ActorRef
-import akka.typed.ActorSystem
-import akka.typed.Extension
-import akka.typed.ExtensionId
-import akka.typed.internal.receptionist.ReceptionistBehaviorProvider
-import akka.typed.internal.receptionist.ReceptionistImpl
+import akka.actor.typed.ActorRef
+import akka.actor.typed.ActorSystem
+import akka.actor.typed.Extension
+import akka.actor.typed.ExtensionId
+import akka.actor.typed.internal.receptionist.ReceptionistBehaviorProvider
+import akka.actor.typed.internal.receptionist.ReceptionistImpl
import scala.collection.JavaConverters._
import scala.concurrent.duration._
@@ -24,7 +24,7 @@ class Receptionist(system: ActorSystem[_]) extends Extension {
val behavior =
if (hasCluster)
system.dynamicAccess
- .createInstanceFor[ReceptionistBehaviorProvider]("akka.typed.cluster.internal.receptionist.ClusterReceptionist$", Nil)
+ .createInstanceFor[ReceptionistBehaviorProvider]("akka.cluster.typed.internal.receptionist.ClusterReceptionist$", Nil)
.recover {
case ex ⇒
system.log.error(
@@ -62,7 +62,7 @@ object Receptionist extends ExtensionId[Receptionist] {
* Internal API
*/
@InternalApi
- private[typed] sealed abstract class AbstractServiceKey {
+ private[akka] sealed abstract class AbstractServiceKey {
type Protocol
/** Type-safe down-cast */
@@ -98,7 +98,7 @@ object Receptionist extends ExtensionId[Receptionist] {
/** Internal superclass for external and internal commands */
@InternalApi
- sealed private[typed] abstract class AllCommands
+ sealed private[akka] abstract class AllCommands
/**
* The set of commands accepted by a Receptionist.
@@ -108,7 +108,7 @@ object Receptionist extends ExtensionId[Receptionist] {
private[typed] abstract class InternalCommand extends AllCommands
/**
- * Associate the given [[akka.typed.ActorRef]] with the given [[ServiceKey]]. Multiple
+ * Associate the given [[akka.actor.typed.ActorRef]] with the given [[ServiceKey]]. Multiple
* registrations can be made for the same key. Unregistration is implied by
* the end of the referenced Actor’s lifecycle.
*
@@ -122,7 +122,7 @@ object Receptionist extends ExtensionId[Receptionist] {
}
/**
- * Confirmation that the given [[akka.typed.ActorRef]] has been associated with the [[ServiceKey]].
+ * Confirmation that the given [[akka.actor.typed.ActorRef]] has been associated with the [[ServiceKey]].
*/
final case class Registered[T](key: ServiceKey[T], serviceInstance: ActorRef[T])
diff --git a/akka-typed/src/main/scala/akka/typed/scaladsl/Actor.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/Actor.scala
similarity index 93%
rename from akka-typed/src/main/scala/akka/typed/scaladsl/Actor.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/Actor.scala
index cb0a45d2b1..500900b223 100644
--- a/akka-typed/src/main/scala/akka/typed/scaladsl/Actor.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/Actor.scala
@@ -1,11 +1,11 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package scaladsl
import akka.annotation.{ ApiMayChange, InternalApi }
-import akka.typed.internal.{ BehaviorImpl, Supervisor, TimerSchedulerImpl }
+import akka.actor.typed.internal.{ BehaviorImpl, Supervisor, TimerSchedulerImpl }
import scala.reflect.ClassTag
import scala.util.control.Exception.Catcher
@@ -38,7 +38,7 @@ object Actor {
/**
* `deferred` is a factory for a behavior. Creation of the behavior instance is deferred until
- * the actor is started, as opposed to `Actor.immutable` that creates the behavior instance
+ * the actor is started, as opposed to [[Actor.immutable]] that creates the behavior instance
* immediately before the actor is running. The `factory` function pass the `ActorContext`
* as parameter and that can for example be used for spawning child actors.
*
@@ -78,7 +78,7 @@ object Actor {
*/
abstract class MutableBehavior[T] extends ExtensibleBehavior[T] {
@throws(classOf[Exception])
- override final def receiveMessage(ctx: akka.typed.ActorContext[T], msg: T): Behavior[T] =
+ override final def receiveMessage(ctx: akka.actor.typed.ActorContext[T], msg: T): Behavior[T] =
onMessage(msg)
/**
@@ -96,11 +96,11 @@ object Actor {
def onMessage(msg: T): Behavior[T]
@throws(classOf[Exception])
- override final def receiveSignal(ctx: akka.typed.ActorContext[T], msg: Signal): Behavior[T] =
+ override final def receiveSignal(ctx: akka.actor.typed.ActorContext[T], msg: Signal): Behavior[T] =
onSignal.applyOrElse(msg, { case _ ⇒ Behavior.unhandled }: PartialFunction[Signal, Behavior[T]])
/**
- * Override this method to process an incoming [[akka.typed.Signal]] and return the next behavior.
+ * Override this method to process an incoming [[akka.actor.typed.Signal]] and return the next behavior.
* This means that all lifecycle hooks, ReceiveTimeout, Terminated and Failed messages
* can initiate a behavior change.
*
@@ -167,7 +167,7 @@ object Actor {
/**
* Construct an actor behavior that can react to both incoming messages and
* lifecycle signals. After spawning this actor from another actor (or as the
- * guardian of an [[akka.typed.ActorSystem]]) it will be executed within an
+ * guardian of an [[akka.actor.typed.ActorSystem]]) it will be executed within an
* [[ActorContext]] that allows access to the system, spawning and watching
* other actors, etc.
*
@@ -210,7 +210,7 @@ object Actor {
/**
* Behavior decorator that copies all received message to the designated
- * monitor [[akka.typed.ActorRef]] before invoking the wrapped behavior. The
+ * monitor [[akka.actor.typed.ActorRef]] before invoking the wrapped behavior. The
* wrapped behavior can evolve (i.e. return different behavior) without needing to be
* wrapped in a `monitor` call again.
*/
@@ -251,7 +251,7 @@ object Actor {
def onFailure[Thr <: Throwable: ClassTag](strategy: SupervisorStrategy): Behavior[T] = {
val tag = implicitly[ClassTag[Thr]]
val effectiveTag = if (tag == NothingClassTag) ThrowableClassTag else tag
- akka.typed.internal.Restarter(Behavior.validateAsInitial(wrapped), strategy)(effectiveTag)
+ akka.actor.typed.internal.Restarter(Behavior.validateAsInitial(wrapped), strategy)(effectiveTag)
}
}
diff --git a/akka-typed/src/main/scala/akka/typed/scaladsl/ActorContext.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/ActorContext.scala
similarity index 91%
rename from akka-typed/src/main/scala/akka/typed/scaladsl/ActorContext.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/ActorContext.scala
index d4a7f13d5b..d5525e6ded 100644
--- a/akka-typed/src/main/scala/akka/typed/scaladsl/ActorContext.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/ActorContext.scala
@@ -1,18 +1,18 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.scaladsl
+package akka.actor.typed.scaladsl
import scala.concurrent.ExecutionContextExecutor
import scala.concurrent.duration.FiniteDuration
import akka.annotation.ApiMayChange
import akka.annotation.DoNotInherit
-import akka.typed.ActorRef
-import akka.typed.ActorSystem
-import akka.typed.Behavior
-import akka.typed.Props
-import akka.typed.EmptyProps
+import akka.actor.typed.ActorRef
+import akka.actor.typed.ActorSystem
+import akka.actor.typed.Behavior
+import akka.actor.typed.Props
+import akka.actor.typed.EmptyProps
/**
* An Actor is given by the combination of a [[Behavior]] and a context in
@@ -34,12 +34,12 @@ import akka.typed.EmptyProps
*/
@DoNotInherit
@ApiMayChange
-trait ActorContext[T] { this: akka.typed.javadsl.ActorContext[T] ⇒
+trait ActorContext[T] { this: akka.actor.typed.javadsl.ActorContext[T] ⇒
/**
* Get the `javadsl` of this `ActorContext`.
*/
- def asJava: akka.typed.javadsl.ActorContext[T]
+ def asJava: akka.actor.typed.javadsl.ActorContext[T]
/**
* The identity of this Actor, bound to the lifecycle of this Actor instance.
@@ -70,13 +70,13 @@ trait ActorContext[T] { this: akka.typed.javadsl.ActorContext[T] ⇒
def child(name: String): Option[ActorRef[Nothing]]
/**
- * Create a child Actor from the given [[akka.typed.Behavior]] under a randomly chosen name.
+ * Create a child Actor from the given [[akka.actor.typed.Behavior]] under a randomly chosen name.
* It is good practice to name Actors wherever practical.
*/
def spawnAnonymous[U](behavior: Behavior[U], props: Props = Props.empty): ActorRef[U]
/**
- * Create a child Actor from the given [[akka.typed.Behavior]] and with the given name.
+ * Create a child Actor from the given [[akka.actor.typed.Behavior]] and with the given name.
*/
def spawn[U](behavior: Behavior[U], name: String, props: Props = Props.empty): ActorRef[U]
diff --git a/akka-typed/src/main/scala/akka/typed/scaladsl/AskPattern.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/AskPattern.scala
similarity index 93%
rename from akka-typed/src/main/scala/akka/typed/scaladsl/AskPattern.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/AskPattern.scala
index 2a11ce5365..313b4d9009 100644
--- a/akka-typed/src/main/scala/akka/typed/scaladsl/AskPattern.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/AskPattern.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed.scaladsl
+package akka.actor.typed.scaladsl
import scala.concurrent.{ Future, Promise }
import akka.util.Timeout
@@ -9,12 +9,12 @@ import akka.actor.InternalActorRef
import akka.pattern.AskTimeoutException
import akka.pattern.PromiseActorRef
import akka.actor.Scheduler
-import akka.typed.internal.FunctionRef
+import akka.actor.typed.internal.FunctionRef
import akka.actor.RootActorPath
import akka.actor.Address
import akka.annotation.InternalApi
-import akka.typed.ActorRef
-import akka.typed.internal.{ adapter ⇒ adapt }
+import akka.actor.typed.ActorRef
+import akka.actor.typed.internal.{ adapter ⇒ adapt }
/**
* The ask-pattern implements the initiator side of a request–reply protocol.
@@ -106,7 +106,7 @@ object AskPattern {
AskPath,
(msg, self) ⇒ {
p.trySuccess(msg)
- self.sendSystem(akka.typed.internal.Terminate())
+ self.sendSystem(akka.actor.typed.internal.Terminate())
},
(self) ⇒ if (!p.isCompleted) p.tryFailure(new NoSuchElementException("ask pattern terminated before value was received")))
actorRef ! f(ref)
@@ -118,5 +118,5 @@ object AskPattern {
}(ec)
}
- private[typed] val AskPath = RootActorPath(Address("akka.typed.internal", "ask"))
+ private[typed] val AskPath = RootActorPath(Address("akka.actor.typed.internal", "ask"))
}
diff --git a/akka-typed/src/main/scala/akka/typed/scaladsl/TimerScheduler.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/TimerScheduler.scala
similarity index 98%
rename from akka-typed/src/main/scala/akka/typed/scaladsl/TimerScheduler.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/TimerScheduler.scala
index 9189d66b59..a86cc02978 100644
--- a/akka-typed/src/main/scala/akka/typed/scaladsl/TimerScheduler.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/TimerScheduler.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.scaladsl
+package akka.actor.typed.scaladsl
import scala.concurrent.duration.FiniteDuration
diff --git a/akka-typed/src/main/scala/akka/typed/scaladsl/adapter/AdapterExtension.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/adapter/AdapterExtension.scala
similarity index 86%
rename from akka-typed/src/main/scala/akka/typed/scaladsl/adapter/AdapterExtension.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/adapter/AdapterExtension.scala
index 2c54f0265e..c93ca34bb6 100644
--- a/akka-typed/src/main/scala/akka/typed/scaladsl/adapter/AdapterExtension.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/adapter/AdapterExtension.scala
@@ -1,11 +1,11 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.scaladsl.adapter
+package akka.actor.typed.scaladsl.adapter
import akka.actor.ExtendedActorSystem
import akka.annotation.InternalApi
-import akka.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
/**
* Internal API
diff --git a/akka-typed/src/main/scala/akka/typed/scaladsl/adapter/PropsAdapter.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/adapter/PropsAdapter.scala
similarity index 62%
rename from akka-typed/src/main/scala/akka/typed/scaladsl/adapter/PropsAdapter.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/adapter/PropsAdapter.scala
index 2e0e07b5ec..9f7f905990 100644
--- a/akka-typed/src/main/scala/akka/typed/scaladsl/adapter/PropsAdapter.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/adapter/PropsAdapter.scala
@@ -1,15 +1,15 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.scaladsl.adapter
+package akka.actor.typed.scaladsl.adapter
-import akka.typed.Behavior
-import akka.typed.EmptyProps
-import akka.typed.Props
-import akka.typed.internal.adapter.ActorAdapter
+import akka.actor.typed.Behavior
+import akka.actor.typed.EmptyProps
+import akka.actor.typed.Props
+import akka.actor.typed.internal.adapter.ActorAdapter
/**
- * Wrap [[akka.typed.Behavior]] in an untyped [[akka.actor.Props]], i.e. when
+ * Wrap [[akka.actor.typed.Behavior]] in an untyped [[akka.actor.Props]], i.e. when
* spawning a typed child actor from an untyped parent actor.
* This is normally not needed because you can use the extension methods
* `spawn` and `spawnAnonymous` on an untyped `ActorContext`, but it's needed
@@ -19,5 +19,5 @@ import akka.typed.internal.adapter.ActorAdapter
*/
object PropsAdapter {
def apply[T](behavior: ⇒ Behavior[T], deploy: Props = Props.empty): akka.actor.Props =
- akka.typed.internal.adapter.PropsAdapter(() ⇒ behavior, deploy)
+ akka.actor.typed.internal.adapter.PropsAdapter(() ⇒ behavior, deploy)
}
diff --git a/akka-typed/src/main/scala/akka/typed/scaladsl/adapter/package.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/adapter/package.scala
similarity index 82%
rename from akka-typed/src/main/scala/akka/typed/scaladsl/adapter/package.scala
rename to akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/adapter/package.scala
index 54bf752e28..c3f44789ef 100644
--- a/akka-typed/src/main/scala/akka/typed/scaladsl/adapter/package.scala
+++ b/akka-actor-typed/src/main/scala/akka/actor/typed/scaladsl/adapter/package.scala
@@ -1,19 +1,19 @@
/**
* Copyright (C) 2016-2017 Lightbend Inc.
*/
-package akka.typed
+package akka.actor.typed
package scaladsl
-import akka.typed.Behavior.UntypedBehavior
-import akka.typed.internal.adapter._
+import akka.actor.typed.Behavior.UntypedBehavior
+import akka.actor.typed.internal.adapter._
/**
* Scala API: Adapters between typed and untyped actors and actor systems.
* The underlying `ActorSystem` is the untyped [[akka.actor.ActorSystem]]
- * which runs Akka Typed [[akka.typed.Behavior]] on an emulation layer. In this
+ * which runs Akka Typed [[akka.actor.typed.Behavior]] on an emulation layer. In this
* system typed and untyped actors can coexist.
*
- * Use these adapters with `import akka.typed.scaladsl.adapter._`.
+ * Use these adapters with `import akka.actor.typed.scaladsl.adapter._`.
*
* Implicit extension methods are added to untyped and typed `ActorSystem`,
* `ActorContext`. Such methods make it possible to create typed child actor
@@ -21,11 +21,11 @@ import akka.typed.internal.adapter._
* `watch` is also supported in both directions.
*
* There is an implicit conversion from untyped [[akka.actor.ActorRef]] to
- * typed [[akka.typed.ActorRef]].
+ * typed [[akka.actor.typed.ActorRef]].
*
* There are also converters (`toTyped`, `toUntyped`) from typed
- * [[akka.typed.ActorRef]] to untyped [[akka.actor.ActorRef]], and between untyped
- * [[akka.actor.ActorSystem]] and typed [[akka.typed.ActorSystem]].
+ * [[akka.actor.typed.ActorRef]] to untyped [[akka.actor.ActorRef]], and between untyped
+ * [[akka.actor.ActorSystem]] and typed [[akka.actor.typed.ActorSystem]].
*/
package object adapter {
@@ -58,7 +58,7 @@ package object adapter {
}
/**
- * Extension methods added to [[akka.typed.ActorSystem]].
+ * Extension methods added to [[akka.actor.typed.ActorSystem]].
*/
implicit class TypedActorSystemOps(val sys: ActorSystem[_]) extends AnyVal {
def toUntyped: akka.actor.ActorSystem = ActorSystemAdapter.toUntyped(sys)
@@ -81,7 +81,7 @@ package object adapter {
}
/**
- * Extension methods added to [[akka.typed.scaladsl.ActorContext]].
+ * Extension methods added to [[akka.actor.typed.scaladsl.ActorContext]].
*/
implicit class TypedActorContextOps(val ctx: scaladsl.ActorContext[_]) extends AnyVal {
def actorOf(props: akka.actor.Props): akka.actor.ActorRef =
@@ -93,14 +93,14 @@ package object adapter {
}
/**
- * Extension methods added to [[akka.typed.ActorRef]].
+ * Extension methods added to [[akka.actor.typed.ActorRef]].
*/
implicit class TypedActorRefOps(val ref: ActorRef[_]) extends AnyVal {
def toUntyped: akka.actor.ActorRef = ActorRefAdapter.toUntyped(ref)
}
/**
- * Implicit conversion from untyped [[akka.actor.ActorRef]] to typed [[akka.typed.ActorRef]].
+ * Implicit conversion from untyped [[akka.actor.ActorRef]] to typed [[akka.actor.typed.ActorRef]].
*/
implicit def actorRefAdapter[T](ref: akka.actor.ActorRef): ActorRef[T] = ActorRefAdapter(ref)
diff --git a/akka-typed/src/main/scala/akka/typed/EventStream.scala b/akka-actor-typed/src/main/scala/akka/typed/EventStream.scala
similarity index 94%
rename from akka-typed/src/main/scala/akka/typed/EventStream.scala
rename to akka-actor-typed/src/main/scala/akka/typed/EventStream.scala
index 5a1f816399..c51739ef40 100644
--- a/akka-typed/src/main/scala/akka/typed/EventStream.scala
+++ b/akka-actor-typed/src/main/scala/akka/typed/EventStream.scala
@@ -1,10 +1,7 @@
-/**
- * Copyright (C) 2016-2017 Lightbend Inc.
- */
package akka.typed
-import akka.{ event ⇒ e }
-import akka.event.Logging.{ LogEvent, LogLevel, StdOutLogger }
+import akka.actor.typed.ActorRef
+import akka.event.Logging.LogLevel
/**
* An EventStream allows local actors to register for certain message types, including
@@ -53,6 +50,10 @@ trait EventStream {
def setLogLevel(loglevel: LogLevel): Unit
}
+import akka.actor.typed.{ ActorRef, Behavior, Settings }
+import akka.{ event ⇒ e }
+import akka.event.Logging.{ LogEvent, StdOutLogger }
+
abstract class Logger {
def initialBehavior: Behavior[Logger.Command]
}
@@ -68,7 +69,7 @@ class DefaultLogger extends Logger with StdOutLogger {
val initialBehavior = {
// TODO avoid depending on dsl here?
- import scaladsl.Actor._
+ import akka.actor.typed.scaladsl.Actor._
deferred[Command] { _ ⇒
immutable[Command] {
case (ctx, Initialize(eventStream, replyTo)) ⇒
diff --git a/akka-cluster-metrics/src/main/scala/akka/cluster/metrics/Metric.scala b/akka-cluster-metrics/src/main/scala/akka/cluster/metrics/Metric.scala
index 4f1a3e5fb8..56b0a55a53 100644
--- a/akka-cluster-metrics/src/main/scala/akka/cluster/metrics/Metric.scala
+++ b/akka-cluster-metrics/src/main/scala/akka/cluster/metrics/Metric.scala
@@ -232,7 +232,7 @@ object StandardMetrics {
* INTERNAL API
*
* Encapsulates evaluation of validity of metric values, conversion of an actual metric value to
- * a [[akka.cluster.Metric]] for consumption by subscribed cluster entities.
+ * a [[akka.cluster.metrics.Metric]] for consumption by subscribed cluster entities.
*/
private[metrics] trait MetricNumericConverter {
diff --git a/akka-typed/src/main/java/akka/typed/cluster/sharding/internal/protobuf/ShardingMessages.java b/akka-cluster-sharding-typed/src/main/java/akka/cluster/sharding/typed/internal/protobuf/ShardingMessages.java
similarity index 86%
rename from akka-typed/src/main/java/akka/typed/cluster/sharding/internal/protobuf/ShardingMessages.java
rename to akka-cluster-sharding-typed/src/main/java/akka/cluster/sharding/typed/internal/protobuf/ShardingMessages.java
index 665dd9344e..3ae871d7ca 100644
--- a/akka-typed/src/main/java/akka/typed/cluster/sharding/internal/protobuf/ShardingMessages.java
+++ b/akka-cluster-sharding-typed/src/main/java/akka/cluster/sharding/typed/internal/protobuf/ShardingMessages.java
@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ShardingMessages.proto
-package akka.typed.cluster.sharding.internal.protobuf;
+package akka.cluster.sharding.typed.internal.protobuf;
public final class ShardingMessages {
private ShardingMessages() {}
@@ -41,7 +41,7 @@ public final class ShardingMessages {
akka.remote.ContainerFormats.PayloadOrBuilder getMessageOrBuilder();
}
/**
- * Protobuf type {@code akka.typed.cluster.sharding.ShardingEnvelope}
+ * Protobuf type {@code akka.cluster.sharding.typed.ShardingEnvelope}
*/
public static final class ShardingEnvelope extends
akka.protobuf.GeneratedMessage
@@ -123,14 +123,14 @@ public final class ShardingMessages {
}
public static final akka.protobuf.Descriptors.Descriptor
getDescriptor() {
- return akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.internal_static_akka_typed_cluster_sharding_ShardingEnvelope_descriptor;
+ return akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.internal_static_akka_cluster_sharding_typed_ShardingEnvelope_descriptor;
}
protected akka.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
- return akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.internal_static_akka_typed_cluster_sharding_ShardingEnvelope_fieldAccessorTable
+ return akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.internal_static_akka_cluster_sharding_typed_ShardingEnvelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope.class, akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope.Builder.class);
+ akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope.class, akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope.Builder.class);
}
public static akka.protobuf.Parser PARSER =
@@ -275,53 +275,53 @@ public final class ShardingMessages {
return super.writeReplace();
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
akka.protobuf.ByteString data)
throws akka.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
akka.protobuf.ByteString data,
akka.protobuf.ExtensionRegistryLite extensionRegistry)
throws akka.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(byte[] data)
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(byte[] data)
throws akka.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
byte[] data,
akka.protobuf.ExtensionRegistryLite extensionRegistry)
throws akka.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(java.io.InputStream input)
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
java.io.InputStream input,
akka.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseDelimitedFrom(java.io.InputStream input)
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseDelimitedFrom(
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseDelimitedFrom(
java.io.InputStream input,
akka.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
akka.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
- public static akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
+ public static akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parseFrom(
akka.protobuf.CodedInputStream input,
akka.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -330,7 +330,7 @@ public final class ShardingMessages {
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope prototype) {
+ public static Builder newBuilder(akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@@ -342,24 +342,24 @@ public final class ShardingMessages {
return builder;
}
/**
- * Protobuf type {@code akka.typed.cluster.sharding.ShardingEnvelope}
+ * Protobuf type {@code akka.cluster.sharding.typed.ShardingEnvelope}
*/
public static final class Builder extends
akka.protobuf.GeneratedMessage.Builder
- implements akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelopeOrBuilder {
+ implements akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelopeOrBuilder {
public static final akka.protobuf.Descriptors.Descriptor
getDescriptor() {
- return akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.internal_static_akka_typed_cluster_sharding_ShardingEnvelope_descriptor;
+ return akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.internal_static_akka_cluster_sharding_typed_ShardingEnvelope_descriptor;
}
protected akka.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
- return akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.internal_static_akka_typed_cluster_sharding_ShardingEnvelope_fieldAccessorTable
+ return akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.internal_static_akka_cluster_sharding_typed_ShardingEnvelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope.class, akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope.Builder.class);
+ akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope.class, akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope.Builder.class);
}
- // Construct using akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope.newBuilder()
+ // Construct using akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -397,23 +397,23 @@ public final class ShardingMessages {
public akka.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.internal_static_akka_typed_cluster_sharding_ShardingEnvelope_descriptor;
+ return akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.internal_static_akka_cluster_sharding_typed_ShardingEnvelope_descriptor;
}
- public akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope getDefaultInstanceForType() {
- return akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope.getDefaultInstance();
+ public akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope getDefaultInstanceForType() {
+ return akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope.getDefaultInstance();
}
- public akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope build() {
- akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope result = buildPartial();
+ public akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope build() {
+ akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
- public akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope buildPartial() {
- akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope result = new akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope(this);
+ public akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope buildPartial() {
+ akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope result = new akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
@@ -434,16 +434,16 @@ public final class ShardingMessages {
}
public Builder mergeFrom(akka.protobuf.Message other) {
- if (other instanceof akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope) {
- return mergeFrom((akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope)other);
+ if (other instanceof akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope) {
+ return mergeFrom((akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope other) {
- if (other == akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope.getDefaultInstance()) return this;
+ public Builder mergeFrom(akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope other) {
+ if (other == akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope.getDefaultInstance()) return this;
if (other.hasEntityId()) {
bitField0_ |= 0x00000001;
entityId_ = other.entityId_;
@@ -474,11 +474,11 @@ public final class ShardingMessages {
akka.protobuf.CodedInputStream input,
akka.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope parsedMessage = null;
+ akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (akka.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (akka.typed.cluster.sharding.internal.protobuf.ShardingMessages.ShardingEnvelope) e.getUnfinishedMessage();
+ parsedMessage = (akka.cluster.sharding.typed.internal.protobuf.ShardingMessages.ShardingEnvelope) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
@@ -680,7 +680,7 @@ public final class ShardingMessages {
return messageBuilder_;
}
- // @@protoc_insertion_point(builder_scope:akka.typed.cluster.sharding.ShardingEnvelope)
+ // @@protoc_insertion_point(builder_scope:akka.cluster.sharding.typed.ShardingEnvelope)
}
static {
@@ -688,14 +688,14 @@ public final class ShardingMessages {
defaultInstance.initFields();
}
- // @@protoc_insertion_point(class_scope:akka.typed.cluster.sharding.ShardingEnvelope)
+ // @@protoc_insertion_point(class_scope:akka.cluster.sharding.typed.ShardingEnvelope)
}
private static akka.protobuf.Descriptors.Descriptor
- internal_static_akka_typed_cluster_sharding_ShardingEnvelope_descriptor;
+ internal_static_akka_cluster_sharding_typed_ShardingEnvelope_descriptor;
private static
akka.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_akka_typed_cluster_sharding_ShardingEnvelope_fieldAccessorTable;
+ internal_static_akka_cluster_sharding_typed_ShardingEnvelope_fieldAccessorTable;
public static akka.protobuf.Descriptors.FileDescriptor
getDescriptor() {
@@ -705,22 +705,22 @@ public final class ShardingMessages {
descriptor;
static {
java.lang.String[] descriptorData = {
- "\n\026ShardingMessages.proto\022\033akka.typed.clu" +
- "ster.sharding\032\026ContainerFormats.proto\"?\n" +
+ "\n\026ShardingMessages.proto\022\033akka.cluster.s" +
+ "harding.typed\032\026ContainerFormats.proto\"?\n" +
"\020ShardingEnvelope\022\020\n\010entityId\030\001 \002(\t\022\031\n\007m" +
- "essage\030\002 \001(\0132\010.PayloadB1\n-akka.typed.clu" +
- "ster.sharding.internal.protobufH\001"
+ "essage\030\002 \001(\0132\010.PayloadB1\n-akka.cluster.s" +
+ "harding.typed.internal.protobufH\001"
};
akka.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new akka.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public akka.protobuf.ExtensionRegistry assignDescriptors(
akka.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
- internal_static_akka_typed_cluster_sharding_ShardingEnvelope_descriptor =
+ internal_static_akka_cluster_sharding_typed_ShardingEnvelope_descriptor =
getDescriptor().getMessageTypes().get(0);
- internal_static_akka_typed_cluster_sharding_ShardingEnvelope_fieldAccessorTable = new
+ internal_static_akka_cluster_sharding_typed_ShardingEnvelope_fieldAccessorTable = new
akka.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_akka_typed_cluster_sharding_ShardingEnvelope_descriptor,
+ internal_static_akka_cluster_sharding_typed_ShardingEnvelope_descriptor,
new java.lang.String[] { "EntityId", "Message", });
return null;
}
diff --git a/akka-typed/src/main/protobuf/ShardingMessages.proto b/akka-cluster-sharding-typed/src/main/protobuf/ShardingMessages.proto
similarity index 70%
rename from akka-typed/src/main/protobuf/ShardingMessages.proto
rename to akka-cluster-sharding-typed/src/main/protobuf/ShardingMessages.proto
index 8cb13d8be2..e2fcfe660a 100644
--- a/akka-typed/src/main/protobuf/ShardingMessages.proto
+++ b/akka-cluster-sharding-typed/src/main/protobuf/ShardingMessages.proto
@@ -1,9 +1,9 @@
/**
* Copyright (C) 2014-2017 Lightbend Inc.
*/
-package akka.typed.cluster.sharding;
+package akka.cluster.sharding.typed;
-option java_package = "akka.typed.cluster.sharding.internal.protobuf";
+option java_package = "akka.cluster.sharding.typed.internal.protobuf";
option optimize_for = SPEED;
import "ContainerFormats.proto";
diff --git a/akka-cluster-sharding-typed/src/main/resources/reference.conf b/akka-cluster-sharding-typed/src/main/resources/reference.conf
new file mode 100644
index 0000000000..0522c24776
--- /dev/null
+++ b/akka-cluster-sharding-typed/src/main/resources/reference.conf
@@ -0,0 +1,11 @@
+akka.actor {
+ serializers {
+ typed-sharding = "akka.cluster.sharding.typed.internal.ShardingSerializer"
+ }
+ serialization-identifiers {
+ "akka.cluster.sharding.typed.internal.ShardingSerializer" = 25
+ }
+ serialization-bindings {
+ "akka.cluster.sharding.typed.ShardingEnvelope" = typed-sharding
+ }
+}
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/sharding/ClusterSharding.scala b/akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/ClusterSharding.scala
similarity index 97%
rename from akka-typed/src/main/scala/akka/typed/cluster/sharding/ClusterSharding.scala
rename to akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/ClusterSharding.scala
index 03f059618a..f40732f67e 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/sharding/ClusterSharding.scala
+++ b/akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/ClusterSharding.scala
@@ -1,19 +1,19 @@
/*
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.sharding
+package akka.cluster.sharding.typed
import akka.annotation.{ DoNotInherit, InternalApi }
import akka.cluster.sharding.ShardCoordinator.{ LeastShardAllocationStrategy, ShardAllocationStrategy }
import akka.cluster.sharding.{ ClusterSharding ⇒ UntypedClusterSharding, ShardRegion ⇒ UntypedShardRegion }
-import akka.typed.cluster.Cluster
-import akka.typed.internal.adapter.{ ActorRefAdapter, ActorSystemAdapter }
-import akka.typed.scaladsl.adapter.PropsAdapter
-import akka.typed.{ ActorRef, ActorSystem, Behavior, Extension, ExtensionId, Props }
+import akka.cluster.typed.Cluster
+import akka.actor.typed.internal.adapter.{ ActorRefAdapter, ActorSystemAdapter }
+import akka.actor.typed.scaladsl.adapter.PropsAdapter
+import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Extension, ExtensionId, Props }
import scala.language.implicitConversions
import scala.reflect.ClassTag
-import akka.typed.Behavior.UntypedBehavior
+import akka.actor.typed.Behavior.UntypedBehavior
/**
* Default envelope type that may be used with Cluster Sharding.
@@ -101,7 +101,7 @@ trait ShardingMessageExtractor[E, A] {
def entityMessage(message: E): A // TODO "unwrapMessage" is how I'd call it?
/**
- * Extract the entity id from an incoming `message`. Only messages that passed the [[#entityId]]
+ * Extract the entity id from an incoming `message`. Only messages that passed the [[entityId]]
* function will be used as input to this function.
*/
def shardId(message: E): String
@@ -187,7 +187,9 @@ object ClusterSharding extends ExtensionId[ClusterSharding] {
/** INTERNAL API */
@InternalApi
final class AdaptedClusterShardingImpl(system: ActorSystem[_]) extends ClusterSharding {
- import akka.typed.scaladsl.adapter._
+
+ import akka.actor.typed.scaladsl.adapter._
+
require(system.isInstanceOf[ActorSystemAdapter[_]], "only adapted untyped actor systems can be used for cluster features")
private val cluster = Cluster(system)
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/sharding/ClusterShardingSettings.scala b/akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/ClusterShardingSettings.scala
similarity index 98%
rename from akka-typed/src/main/scala/akka/typed/cluster/sharding/ClusterShardingSettings.scala
rename to akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/ClusterShardingSettings.scala
index a8fa24860f..e1d09ef224 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/sharding/ClusterShardingSettings.scala
+++ b/akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/ClusterShardingSettings.scala
@@ -2,14 +2,14 @@
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.sharding
+package akka.cluster.sharding.typed
import akka.actor.NoSerializationVerificationNeeded
import akka.annotation.InternalApi
import akka.cluster.sharding.{ ClusterShardingSettings ⇒ UntypedShardingSettings }
import akka.cluster.singleton.{ ClusterSingletonManagerSettings ⇒ UntypedClusterSingletonManagerSettings }
-import akka.typed.ActorSystem
-import akka.typed.cluster.{ Cluster, ClusterSingletonManagerSettings }
+import akka.actor.typed.ActorSystem
+import akka.cluster.typed.{ Cluster, ClusterSingletonManagerSettings }
import com.typesafe.config.Config
import scala.concurrent.duration.FiniteDuration
@@ -226,7 +226,7 @@ final class ClusterShardingSettings(
val tuningParameters: ClusterShardingSettings.TuningParameters,
val coordinatorSingletonSettings: ClusterSingletonManagerSettings) extends NoSerializationVerificationNeeded {
- import akka.typed.cluster.sharding.ClusterShardingSettings.{ StateStoreModeDData, StateStoreModePersistence }
+ import akka.cluster.sharding.typed.ClusterShardingSettings.{ StateStoreModeDData, StateStoreModePersistence }
require(
stateStoreMode == StateStoreModePersistence || stateStoreMode == StateStoreModeDData,
s"Unknown 'state-store-mode' [$stateStoreMode], " +
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/sharding/EntityRef.scala b/akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/EntityRef.scala
similarity index 89%
rename from akka-typed/src/main/scala/akka/typed/cluster/sharding/EntityRef.scala
rename to akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/EntityRef.scala
index 68df245919..9ccfcbffb6 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/sharding/EntityRef.scala
+++ b/akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/EntityRef.scala
@@ -1,14 +1,14 @@
/*
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.sharding
+package akka.cluster.sharding.typed
import akka.actor.{ InternalActorRef, Scheduler }
import akka.annotation.InternalApi
import akka.pattern.{ AskTimeoutException, PromiseActorRef }
-import akka.typed.ActorRef
-import akka.typed.scaladsl.AskPattern
-import akka.typed.scaladsl.AskPattern.PromiseRef
+import akka.actor.typed.ActorRef
+import akka.actor.typed.scaladsl.AskPattern
+import akka.actor.typed.scaladsl.AskPattern.PromiseRef
import akka.util.Timeout
import scala.concurrent.Future
@@ -34,7 +34,7 @@ trait EntityRef[A] {
/**
* Allows to "ask" the [[EntityRef]] for a reply.
- * See [[akka.typed.scaladsl.AskPattern]] for a complete write-up of this pattern
+ * See [[akka.actor.typed.scaladsl.AskPattern]] for a complete write-up of this pattern
*
* Example usage:
* {{{
@@ -62,7 +62,7 @@ object EntityRef {
/**
* Allows to "ask" the [[EntityRef]] for a reply.
- * See [[akka.typed.scaladsl.AskPattern]] for a complete write-up of this pattern
+ * See [[akka.actor.typed.scaladsl.AskPattern]] for a complete write-up of this pattern
*
* Example usage:
* {{{
@@ -83,13 +83,11 @@ object EntityRef {
@InternalApi
private[akka] final class AdaptedEntityRefImpl[A](shardRegion: akka.actor.ActorRef, entityId: String) extends EntityRef[A] {
- import akka.pattern.ask
override def tell(msg: A): Unit =
shardRegion ! ShardingEnvelope(entityId, msg)
override def ask[U](f: (ActorRef[U]) ⇒ A)(implicit timeout: Timeout, scheduler: Scheduler): Future[U] = {
- import akka.typed._
val p = new EntityPromiseRef[U](shardRegion.asInstanceOf[InternalActorRef], timeout)
val m = f(p.ref)
if (p.promiseRef ne null) p.promiseRef.messageClassName = m.getClass.getName
@@ -97,10 +95,10 @@ private[akka] final class AdaptedEntityRefImpl[A](shardRegion: akka.actor.ActorR
p.future
}
- /** Similar to [[akka.typed.scaladsl.AskPattern.PromiseRef]] but for an [[EntityRef]] target. */
+ /** Similar to [[akka.actor.typed.scaladsl.AskPattern.PromiseRef]] but for an [[EntityRef]] target. */
@InternalApi
private final class EntityPromiseRef[U](untyped: InternalActorRef, timeout: Timeout) {
- import akka.typed.internal.{ adapter ⇒ adapt }
+ import akka.actor.typed.internal.{ adapter ⇒ adapt }
// Note: _promiseRef mustn't have a type pattern, since it can be null
private[this] val (_ref: ActorRef[U], _future: Future[U], _promiseRef) =
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/sharding/internal/ShardingSerializer.scala b/akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/internal/ShardingSerializer.scala
similarity index 83%
rename from akka-typed/src/main/scala/akka/typed/cluster/sharding/internal/ShardingSerializer.scala
rename to akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/internal/ShardingSerializer.scala
index 7688a398dc..d1d4c49bc9 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/sharding/internal/ShardingSerializer.scala
+++ b/akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/internal/ShardingSerializer.scala
@@ -1,21 +1,15 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.sharding.internal
+package akka.cluster.sharding.typed.internal
-import akka.typed.cluster.sharding.internal.protobuf.ShardingMessages
-import java.nio.charset.StandardCharsets
-
-import akka.annotation.InternalApi
-import akka.serialization.{ BaseSerializer, SerializerWithStringManifest }
-import akka.typed.ActorRef
-import akka.typed.cluster.ActorRefResolver
-import akka.typed.internal.adapter.ActorRefAdapter
-import akka.typed.scaladsl.adapter._
-import akka.remote.serialization.WrappedPayloadSupport
-import akka.typed.cluster.sharding.ShardingEnvelope
import java.io.NotSerializableException
-import akka.typed.cluster.sharding.StartEntity
+
+import akka.cluster.sharding.typed.internal.protobuf.ShardingMessages
+import akka.annotation.InternalApi
+import akka.remote.serialization.WrappedPayloadSupport
+import akka.serialization.{ BaseSerializer, SerializerWithStringManifest }
+import akka.cluster.sharding.typed.{ ShardingEnvelope, StartEntity }
/**
* INTERNAL API
diff --git a/akka-cluster-sharding-typed/src/test/resources/application.conf b/akka-cluster-sharding-typed/src/test/resources/application.conf
new file mode 100644
index 0000000000..e053d9d956
--- /dev/null
+++ b/akka-cluster-sharding-typed/src/test/resources/application.conf
@@ -0,0 +1,21 @@
+akka.loglevel = DEBUG
+akka.actor.debug.lifecycle = off
+
+dispatcher-1 {
+ fork-join-executor {
+ parallelism-min=1
+ parallelism-max=1
+ }
+}
+dispatcher-2 {
+ fork-join-executor {
+ parallelism-min=2
+ parallelism-max=2
+ }
+}
+dispatcher-8 {
+ fork-join-executor {
+ parallelism-min=8
+ parallelism-max=8
+ }
+}
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/sharding/ClusterShardingPersistenceSpec.scala b/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/ClusterShardingPersistenceSpec.scala
similarity index 83%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/sharding/ClusterShardingPersistenceSpec.scala
rename to akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/ClusterShardingPersistenceSpec.scala
index 6ba51a7f2f..2815f5d8c4 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/sharding/ClusterShardingPersistenceSpec.scala
+++ b/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/ClusterShardingPersistenceSpec.scala
@@ -2,23 +2,18 @@
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.sharding
+package akka.cluster.sharding.typed
-import akka.cluster.sharding.ShardCoordinator.LeastShardAllocationStrategy
-import akka.typed.{ ActorRef, ActorSystem, Props, TypedSpec }
-import akka.typed.cluster.Cluster
-import akka.typed.internal.adapter.ActorSystemAdapter
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.adapter._
-import akka.typed.testkit.TestKitSettings
-import akka.typed.testkit.scaladsl.TestProbe
+import akka.actor.typed.{ ActorRef, Props, TypedSpec }
import com.typesafe.config.ConfigFactory
import org.scalatest.concurrent.ScalaFutures
import scala.concurrent.duration._
-import akka.typed.Behavior
-import akka.typed.persistence.scaladsl.PersistentActor
-import akka.typed.persistence.scaladsl.PersistentActor.PersistNothing
+import akka.actor.typed.Behavior
+import akka.typed.testkit.TestKitSettings
+import akka.typed.testkit.scaladsl.TestProbe
+import akka.persistence.typed.scaladsl.PersistentActor
+import akka.persistence.typed.scaladsl.PersistentActor.PersistNothing
object ClusterShardingPersistenceSpec {
val config = ConfigFactory.parseString(
@@ -67,7 +62,7 @@ object ClusterShardingPersistenceSpec {
}
class ClusterShardingPersistenceSpec extends TypedSpec(ClusterShardingPersistenceSpec.config) with ScalaFutures {
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
import ClusterShardingPersistenceSpec._
implicit val s = system
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/sharding/ClusterShardingSpec.scala b/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/ClusterShardingSpec.scala
similarity index 93%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/sharding/ClusterShardingSpec.scala
rename to akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/ClusterShardingSpec.scala
index 3165c0c17d..c37762a186 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/sharding/ClusterShardingSpec.scala
+++ b/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/ClusterShardingSpec.scala
@@ -2,14 +2,14 @@
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.sharding
+package akka.cluster.sharding.typed
import akka.cluster.sharding.ShardCoordinator.LeastShardAllocationStrategy
-import akka.typed.{ ActorRef, ActorSystem, Props, TypedSpec }
-import akka.typed.cluster.Cluster
-import akka.typed.internal.adapter.ActorSystemAdapter
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.{ ActorRef, ActorSystem, Props, TypedSpec }
+import akka.cluster.typed.Cluster
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.adapter._
import akka.typed.testkit.TestKitSettings
import akka.typed.testkit.scaladsl.TestProbe
import com.typesafe.config.ConfigFactory
@@ -17,12 +17,12 @@ import org.scalatest.concurrent.ScalaFutures
import scala.concurrent.duration._
import scala.concurrent.Await
-import akka.typed.cluster.Join
+import akka.cluster.typed.Join
import org.scalatest.concurrent.Eventually
import akka.cluster.MemberStatus
import akka.actor.ExtendedActorSystem
import akka.serialization.SerializerWithStringManifest
-import akka.typed.cluster.ActorRefResolver
+import akka.cluster.typed.ActorRefResolver
import java.nio.charset.StandardCharsets
object ClusterShardingSpec {
@@ -46,11 +46,11 @@ object ClusterShardingSpec {
allow-java-serialization = off
serializers {
- test = "akka.typed.cluster.sharding.ClusterShardingSpec$$Serializer"
+ test = "akka.cluster.sharding.typed.ClusterShardingSpec$$Serializer"
}
serialization-bindings {
- "akka.typed.cluster.sharding.ClusterShardingSpec$$TestProtocol" = test
- "akka.typed.cluster.sharding.ClusterShardingSpec$$IdTestProtocol" = test
+ "akka.cluster.sharding.typed.ClusterShardingSpec$$TestProtocol" = test
+ "akka.cluster.sharding.typed.ClusterShardingSpec$$IdTestProtocol" = test
}
}
""".stripMargin)
@@ -118,7 +118,7 @@ object ClusterShardingSpec {
}
class ClusterShardingSpec extends TypedSpec(ClusterShardingSpec.config) with ScalaFutures with Eventually {
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
import ClusterShardingSpec._
implicit val s = system
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/sharding/ShardingSerializerSpec.scala b/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/ShardingSerializerSpec.scala
similarity index 76%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/sharding/ShardingSerializerSpec.scala
rename to akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/ShardingSerializerSpec.scala
index ef91f3f6df..9d6764c7fd 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/sharding/ShardingSerializerSpec.scala
+++ b/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/ShardingSerializerSpec.scala
@@ -1,13 +1,14 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster.sharding
+package akka.cluster.sharding.typed
+import akka.cluster.sharding.typed.internal.ShardingSerializer
import akka.serialization.SerializationExtension
-import akka.typed.TypedSpec
-import akka.typed.cluster.sharding.internal.ShardingSerializer
-import akka.typed.internal.adapter.ActorSystemAdapter
-import akka.typed.scaladsl.AskPattern._
+import akka.actor.typed.TypedSpec
+import akka.cluster.sharding.typed.internal.ShardingSerializer
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.scaladsl.AskPattern._
class ShardingSerializerSpec extends TypedSpec {
diff --git a/akka-cluster-typed/src/main/resources/reference.conf b/akka-cluster-typed/src/main/resources/reference.conf
new file mode 100644
index 0000000000..c1fafc892d
--- /dev/null
+++ b/akka-cluster-typed/src/main/resources/reference.conf
@@ -0,0 +1,9 @@
+# TODO: move these out somewhere else when doing #23632
+akka.actor {
+ serializers {
+ typed-misc = "akka.cluster.typed.internal.MiscMessageSerializer"
+ }
+ serialization-identifiers {
+ "akka.cluster.typed.internal.MiscMessageSerializer" = 24
+ }
+}
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ddata/internal/ReplicatorBehavior.scala b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/internal/ReplicatorBehavior.scala
similarity index 96%
rename from akka-typed/src/main/scala/akka/typed/cluster/ddata/internal/ReplicatorBehavior.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/internal/ReplicatorBehavior.scala
index 04f0b0bc78..ca677dde29 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ddata/internal/ReplicatorBehavior.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/internal/ReplicatorBehavior.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata.internal
+package akka.cluster.ddata.typed.internal
import scala.compat.java8.OptionConverters._
import scala.concurrent.duration._
@@ -11,21 +11,21 @@ import scala.concurrent.Future
import akka.annotation.InternalApi
import akka.cluster.{ ddata ⇒ dd }
import akka.pattern.ask
-import akka.typed.ActorRef
-import akka.typed.Behavior
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.ActorRef
+import akka.actor.typed.Behavior
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.adapter._
import akka.util.Timeout
import akka.cluster.ddata.ReplicatedData
import akka.cluster.ddata.Key
-import akka.typed.Terminated
+import akka.actor.typed.Terminated
/**
* INTERNAL API
*/
@InternalApi private[akka] object ReplicatorBehavior {
- import akka.typed.cluster.ddata.javadsl.{ Replicator ⇒ JReplicator }
- import akka.typed.cluster.ddata.scaladsl.{ Replicator ⇒ SReplicator }
+ import akka.cluster.ddata.typed.javadsl.{ Replicator ⇒ JReplicator }
+ import akka.cluster.ddata.typed.scaladsl.{ Replicator ⇒ SReplicator }
private case class InternalChanged[A <: ReplicatedData](chg: dd.Replicator.Changed[A], subscriber: ActorRef[JReplicator.Changed[A]])
extends JReplicator.Command
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ddata/javadsl/DistributedData.scala b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/javadsl/DistributedData.scala
similarity index 69%
rename from akka-typed/src/main/scala/akka/typed/cluster/ddata/javadsl/DistributedData.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/javadsl/DistributedData.scala
index e6a4f8618b..5797e49d28 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ddata/javadsl/DistributedData.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/javadsl/DistributedData.scala
@@ -1,13 +1,12 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata.javadsl
+package akka.cluster.ddata.typed.javadsl
-import akka.typed.ActorSystem
-import akka.typed.Extension
-import akka.typed.ExtensionId
-import akka.typed.ActorRef
-import akka.typed.cluster.ddata.scaladsl
+import akka.actor.typed.ActorSystem
+import akka.actor.typed.Extension
+import akka.actor.typed.ExtensionId
+import akka.actor.typed.ActorRef
object DistributedData extends ExtensionId[DistributedData] {
def get(system: ActorSystem[_]): DistributedData = apply(system)
@@ -22,7 +21,7 @@ object DistributedData extends ExtensionId[DistributedData] {
* `akka.cluster.ddata` section, see `reference.conf`.
*
* This is using the same underlying `Replicator` instance as
- * [[akka.akka.cluster.ddata.DistributedData]] and that means that typed
+ * [[akka.cluster.ddata.DistributedData]] and that means that typed
* and untyped actors can share the same data.
*/
class DistributedData(system: ActorSystem[_]) extends Extension {
@@ -31,7 +30,7 @@ class DistributedData(system: ActorSystem[_]) extends Extension {
* `ActorRef` of the [[Replicator]] .
*/
val replicator: ActorRef[Replicator.Command] =
- scaladsl.DistributedData(system).replicator.narrow[Replicator.Command]
+ akka.cluster.ddata.typed.scaladsl.DistributedData(system).replicator.narrow[Replicator.Command]
}
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ddata/javadsl/Replicator.scala b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/javadsl/Replicator.scala
similarity index 94%
rename from akka-typed/src/main/scala/akka/typed/cluster/ddata/javadsl/Replicator.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/javadsl/Replicator.scala
index 89ad4c8804..38b0d9d416 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ddata/javadsl/Replicator.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/javadsl/Replicator.scala
@@ -1,25 +1,31 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata.javadsl
-
-import akka.actor.NoSerializationVerificationNeeded
+package akka.cluster.ddata.typed.javadsl
import java.util.function.{ Function ⇒ JFunction }
import akka.cluster.{ ddata ⇒ dd }
-import akka.typed.cluster.ddata.scaladsl
+import akka.cluster.ddata.typed.scaladsl
import akka.cluster.ddata.Key
import akka.cluster.ddata.ReplicatedData
-import akka.typed.ActorRef
-import akka.typed.Behavior
-import akka.typed.cluster.ddata.internal.ReplicatorBehavior
+import akka.actor.typed.ActorRef
+import akka.actor.typed.Behavior
+import akka.cluster.ddata.typed.internal.ReplicatorBehavior
+import akka.cluster.ddata.typed.scaladsl
import scala.concurrent.duration.FiniteDuration
import scala.concurrent.duration.Duration
import java.util.Optional
-import akka.actor.DeadLetterSuppression
-import akka.annotation.InternalApi
-import akka.annotation.DoNotInherit
+import java.util.function.{ Function ⇒ JFunction }
+
+import akka.actor.{ DeadLetterSuppression, NoSerializationVerificationNeeded }
+import akka.actor.typed.{ ActorRef, Behavior }
+import akka.annotation.{ DoNotInherit, InternalApi }
+import akka.cluster.ddata.typed.internal.ReplicatorBehavior
+import akka.cluster.ddata.typed.scaladsl
+import akka.cluster.{ ddata ⇒ dd }
+
+import scala.concurrent.duration.{ Duration, FiniteDuration }
import scala.util.control.NoStackTrace
/**
@@ -41,7 +47,7 @@ object Replicator {
def behavior(settings: dd.ReplicatorSettings, underlyingReplicator: akka.actor.ActorRef): Behavior[Command] =
ReplicatorBehavior.behavior(settings, Some(underlyingReplicator)).narrow[Command]
- @DoNotInherit trait Command extends scaladsl.Replicator.Command
+ @DoNotInherit trait Command extends akka.cluster.ddata.typed.scaladsl.Replicator.Command
sealed trait ReadConsistency {
def timeout: FiniteDuration
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ddata/javadsl/ReplicatorSettings.scala b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/javadsl/ReplicatorSettings.scala
similarity index 83%
rename from akka-typed/src/main/scala/akka/typed/cluster/ddata/javadsl/ReplicatorSettings.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/javadsl/ReplicatorSettings.scala
index 0552d590a7..c818f244c6 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ddata/javadsl/ReplicatorSettings.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/javadsl/ReplicatorSettings.scala
@@ -1,11 +1,11 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata.javadsl
+package akka.cluster.ddata.typed.javadsl
import akka.cluster.{ ddata ⇒ dd }
-import akka.typed.ActorSystem
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.ActorSystem
+import akka.actor.typed.scaladsl.adapter._
import com.typesafe.config.Config
object ReplicatorSettings {
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/DistributedData.scala b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/DistributedData.scala
similarity index 82%
rename from akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/DistributedData.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/DistributedData.scala
index 678757d33a..2fe31dff5a 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/DistributedData.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/DistributedData.scala
@@ -1,12 +1,12 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata.scaladsl
+package akka.cluster.ddata.typed.scaladsl
-import akka.typed.ActorSystem
-import akka.typed.Extension
-import akka.typed.ExtensionId
-import akka.typed.ActorRef
+import akka.actor.typed.ActorSystem
+import akka.actor.typed.Extension
+import akka.actor.typed.ExtensionId
+import akka.actor.typed.ActorRef
import akka.actor.ExtendedActorSystem
object DistributedData extends ExtensionId[DistributedData] {
@@ -22,11 +22,11 @@ object DistributedData extends ExtensionId[DistributedData] {
* `akka.cluster.ddata` section, see `reference.conf`.
*
* This is using the same underlying `Replicator` instance as
- * [[akka.akka.cluster.ddata.DistributedData]] and that means that typed
+ * [[akka.cluster.ddata.DistributedData]] and that means that typed
* and untyped actors can share the same data.
*/
class DistributedData(system: ActorSystem[_]) extends Extension {
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
private val untypedSystem = system.toUntyped.asInstanceOf[ExtendedActorSystem]
private val config = system.settings.config.getConfig("akka.cluster.distributed-data")
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/Replicator.scala b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/Replicator.scala
similarity index 98%
rename from akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/Replicator.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/Replicator.scala
index f1dc860123..fb0e0a3c8b 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/Replicator.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/Replicator.scala
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata.scaladsl
+package akka.cluster.ddata.typed.scaladsl
import akka.actor.NoSerializationVerificationNeeded
import akka.cluster.{ ddata ⇒ dd }
import akka.cluster.ddata.Key
import akka.cluster.ddata.ReplicatedData
-import akka.typed.ActorRef
-import akka.typed.Behavior
-import akka.typed.cluster.ddata.internal.ReplicatorBehavior
+import akka.actor.typed.ActorRef
+import akka.actor.typed.Behavior
+import akka.cluster.ddata.typed.internal.ReplicatorBehavior
/**
* @see [[akka.cluster.ddata.Replicator]].
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/ReplicatorSettings.scala b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/ReplicatorSettings.scala
similarity index 84%
rename from akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/ReplicatorSettings.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/ReplicatorSettings.scala
index 9b3e4a3455..467033e85f 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/ReplicatorSettings.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/ReplicatorSettings.scala
@@ -1,11 +1,11 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata.scaladsl
+package akka.cluster.ddata.typed.scaladsl
import akka.cluster.{ ddata ⇒ dd }
-import akka.typed.ActorSystem
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.ActorSystem
+import akka.actor.typed.scaladsl.adapter._
import com.typesafe.config.Config
/**
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/package.scala b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/package.scala
similarity index 88%
rename from akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/package.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/package.scala
index d82d40127e..f6d6f8b2c3 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ddata/scaladsl/package.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/ddata/typed/scaladsl/package.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata
+package akka.cluster.ddata.typed
import akka.cluster.{ ddata ⇒ dd }
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ActorRefResolver.scala b/akka-cluster-typed/src/main/scala/akka/cluster/typed/ActorRefResolver.scala
similarity index 77%
rename from akka-typed/src/main/scala/akka/typed/cluster/ActorRefResolver.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/typed/ActorRefResolver.scala
index 96db8b1284..de8ec2ff29 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ActorRefResolver.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/typed/ActorRefResolver.scala
@@ -1,18 +1,10 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster
+package akka.cluster.typed
-import java.nio.charset.StandardCharsets
-
-import akka.typed.ActorSystem
-import akka.typed.Extension
-import akka.typed.ExtensionId
-import akka.typed.ActorRef
-import akka.typed.scaladsl.adapter._
import akka.actor.ExtendedActorSystem
-import akka.annotation.InternalApi
-import akka.serialization.{ BaseSerializer, SerializerWithStringManifest }
+import akka.actor.typed.{ ActorRef, ActorSystem, Extension, ExtensionId }
object ActorRefResolver extends ExtensionId[ActorRefResolver] {
def get(system: ActorSystem[_]): ActorRefResolver = apply(system)
@@ -25,7 +17,7 @@ object ActorRefResolver extends ExtensionId[ActorRefResolver] {
* Serialization and deserialization of `ActorRef`.
*/
class ActorRefResolver(system: ActorSystem[_]) extends Extension {
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
private val untypedSystem = system.toUntyped.asInstanceOf[ExtendedActorSystem]
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/Cluster.scala b/akka-cluster-typed/src/main/scala/akka/cluster/typed/Cluster.scala
similarity index 97%
rename from akka-typed/src/main/scala/akka/typed/cluster/Cluster.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/typed/Cluster.scala
index 93670c7b79..413a3c3801 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/Cluster.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/typed/Cluster.scala
@@ -1,15 +1,15 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster
+package akka.cluster.typed
import akka.actor.Address
import akka.annotation.DoNotInherit
import akka.cluster.ClusterEvent.{ ClusterDomainEvent, CurrentClusterState }
import akka.cluster._
import akka.japi.Util
-import akka.typed.cluster.internal.AdapterClusterImpl
-import akka.typed.{ ActorRef, ActorSystem, Extension, ExtensionId }
+import akka.actor.typed.{ ActorRef, ActorSystem, Extension, ExtensionId }
+import akka.cluster.typed.internal.AdapterClusterImpl
import scala.collection.immutable
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/ClusterSingleton.scala b/akka-cluster-typed/src/main/scala/akka/cluster/typed/ClusterSingleton.scala
similarity index 96%
rename from akka-typed/src/main/scala/akka/typed/cluster/ClusterSingleton.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/typed/ClusterSingleton.scala
index fc5cd036bb..2e56a1c68f 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/ClusterSingleton.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/typed/ClusterSingleton.scala
@@ -1,15 +1,15 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster
+package akka.cluster.typed
import akka.actor.NoSerializationVerificationNeeded
import akka.annotation.{ DoNotInherit, InternalApi }
import akka.cluster.ClusterSettings.DataCenter
import akka.cluster.singleton.{ ClusterSingletonProxySettings, ClusterSingletonManagerSettings ⇒ UntypedClusterSingletonManagerSettings }
-import akka.typed.cluster.internal.AdaptedClusterSingletonImpl
-import akka.typed.internal.adapter.ActorSystemAdapter
-import akka.typed.{ ActorRef, ActorSystem, Behavior, Extension, ExtensionId, Props }
+import akka.cluster.typed.internal.AdaptedClusterSingletonImpl
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Extension, ExtensionId, Props }
import com.typesafe.config.Config
import scala.concurrent.duration._
@@ -137,7 +137,7 @@ trait ClusterSingleton extends Extension {
}
object ClusterSingletonManagerSettings {
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
/**
* Create settings from the default configuration
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/internal/AdaptedClusterImpl.scala b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/AdaptedClusterImpl.scala
similarity index 94%
rename from akka-typed/src/main/scala/akka/typed/cluster/internal/AdaptedClusterImpl.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/AdaptedClusterImpl.scala
index 198400716a..b619878c36 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/internal/AdaptedClusterImpl.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/AdaptedClusterImpl.scala
@@ -1,17 +1,17 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster.internal
+package akka.cluster.typed.internal
import akka.actor.ExtendedActorSystem
import akka.annotation.InternalApi
import akka.cluster.ClusterEvent.MemberEvent
import akka.cluster.{ ClusterEvent, MemberStatus }
-import akka.typed.{ ActorRef, ActorSystem, Terminated }
-import akka.typed.cluster._
-import akka.typed.internal.adapter.ActorSystemAdapter
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.{ ActorRef, ActorSystem, Terminated }
+import akka.cluster.typed._
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.adapter._
/**
* INTERNAL API:
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/internal/AdaptedClusterSingletonImpl.scala b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/AdaptedClusterSingletonImpl.scala
similarity index 86%
rename from akka-typed/src/main/scala/akka/typed/cluster/internal/AdaptedClusterSingletonImpl.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/AdaptedClusterSingletonImpl.scala
index fcd99afc18..cb0a8b284f 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/internal/AdaptedClusterSingletonImpl.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/AdaptedClusterSingletonImpl.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster.internal
+package akka.cluster.typed.internal
import java.util.concurrent.ConcurrentHashMap
import java.util.function.{ Function ⇒ JFunction }
@@ -9,11 +9,11 @@ import java.util.function.{ Function ⇒ JFunction }
import akka.actor.{ ExtendedActorSystem, InvalidActorNameException }
import akka.annotation.InternalApi
import akka.cluster.singleton.{ ClusterSingletonProxy, ClusterSingletonManager ⇒ OldSingletonManager }
-import akka.typed.Behavior.UntypedBehavior
-import akka.typed.cluster.{ Cluster, ClusterSingleton, ClusterSingletonImpl, ClusterSingletonSettings }
-import akka.typed.internal.adapter.ActorSystemAdapter
-import akka.typed.scaladsl.adapter._
-import akka.typed.{ ActorRef, ActorSystem, Behavior, Props }
+import akka.actor.typed.Behavior.UntypedBehavior
+import akka.cluster.typed.{ Cluster, ClusterSingleton, ClusterSingletonImpl, ClusterSingletonSettings }
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.scaladsl.adapter._
+import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Props }
/**
* INTERNAL API:
@@ -22,7 +22,7 @@ import akka.typed.{ ActorRef, ActorSystem, Behavior, Props }
private[akka] final class AdaptedClusterSingletonImpl(system: ActorSystem[_]) extends ClusterSingleton {
require(system.isInstanceOf[ActorSystemAdapter[_]], "only adapted actor systems can be used for the typed cluster singleton")
import ClusterSingletonImpl._
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
private lazy val cluster = Cluster(system)
private val untypedSystem = system.toUntyped.asInstanceOf[ExtendedActorSystem]
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/internal/MiscMessageSerializer.scala b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/MiscMessageSerializer.scala
similarity index 86%
rename from akka-typed/src/main/scala/akka/typed/cluster/internal/MiscMessageSerializer.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/MiscMessageSerializer.scala
index 9bab33931a..845b674c66 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/internal/MiscMessageSerializer.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/MiscMessageSerializer.scala
@@ -1,16 +1,15 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster.internal
+package akka.cluster.typed.internal
import java.nio.charset.StandardCharsets
import akka.annotation.InternalApi
import akka.serialization.{ BaseSerializer, SerializerWithStringManifest }
-import akka.typed.ActorRef
-import akka.typed.cluster.ActorRefResolver
-import akka.typed.internal.adapter.ActorRefAdapter
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.ActorRef
+import akka.cluster.typed.ActorRefResolver
+import akka.actor.typed.scaladsl.adapter._
import java.io.NotSerializableException
@InternalApi
diff --git a/akka-typed/src/main/scala/akka/typed/cluster/internal/receptionist/ClusterReceptionist.scala b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionist.scala
similarity index 85%
rename from akka-typed/src/main/scala/akka/typed/cluster/internal/receptionist/ClusterReceptionist.scala
rename to akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionist.scala
index bd1e19e46d..e376fef701 100644
--- a/akka-typed/src/main/scala/akka/typed/cluster/internal/receptionist/ClusterReceptionist.scala
+++ b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionist.scala
@@ -1,7 +1,7 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster.internal.receptionist
+package akka.cluster.typed.internal.receptionist
import akka.annotation.InternalApi
import akka.cluster.Cluster
@@ -10,16 +10,16 @@ import akka.cluster.ddata.ORMultiMap
import akka.cluster.ddata.ORMultiMapKey
import akka.cluster.ddata.Replicator
import akka.cluster.ddata.Replicator.WriteConsistency
-import akka.typed.ActorRef
-import akka.typed.Behavior
-import akka.typed.internal.receptionist.ReceptionistBehaviorProvider
-import akka.typed.internal.receptionist.ReceptionistImpl
-import akka.typed.internal.receptionist.ReceptionistImpl._
-import akka.typed.receptionist.Receptionist.AbstractServiceKey
-import akka.typed.receptionist.Receptionist.AllCommands
-import akka.typed.receptionist.Receptionist.Command
-import akka.typed.receptionist.Receptionist.ServiceKey
-import akka.typed.scaladsl.ActorContext
+import akka.actor.typed.ActorRef
+import akka.actor.typed.Behavior
+import akka.actor.typed.internal.receptionist.ReceptionistBehaviorProvider
+import akka.actor.typed.internal.receptionist.ReceptionistImpl
+import akka.actor.typed.internal.receptionist.ReceptionistImpl._
+import akka.actor.typed.receptionist.Receptionist.AbstractServiceKey
+import akka.actor.typed.receptionist.Receptionist.AllCommands
+import akka.actor.typed.receptionist.Receptionist.Command
+import akka.actor.typed.receptionist.Receptionist.ServiceKey
+import akka.actor.typed.scaladsl.ActorContext
import scala.language.existentials
import scala.language.higherKinds
@@ -30,7 +30,7 @@ private[typed] object ClusterReceptionist extends ReceptionistBehaviorProvider {
private final val ReceptionistKey = ORMultiMapKey[ServiceKey[_], ActorRef[_]]("ReceptionistKey")
private final val EmptyORMultiMap = ORMultiMap.empty[ServiceKey[_], ActorRef[_]]
- case class TypedORMultiMap[K[_], V[_]](val map: ORMultiMap[K[_], V[_]]) extends AnyVal {
+ case class TypedORMultiMap[K[_], V[_]](map: ORMultiMap[K[_], V[_]]) extends AnyVal {
def getOrElse[T](key: K[T], default: ⇒ Set[V[T]]): Set[V[T]] =
map.getOrElse(key, default.asInstanceOf[Set[V[_]]]).asInstanceOf[Set[V[T]]]
@@ -64,7 +64,7 @@ private[typed] object ClusterReceptionist extends ReceptionistBehaviorProvider {
* Returns an ReceptionistImpl.ExternalInterface that synchronizes registered services with
*/
def clusteredReceptionist(settings: ClusterReceptionistSettings = ClusterReceptionistSettings())(ctx: ActorContext[AllCommands]): ReceptionistImpl.ExternalInterface = {
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
val untypedSystem = ctx.system.toUntyped
val replicator = DistributedData(untypedSystem).replicator
diff --git a/akka-typed-tests/src/test/java/akka/typed/cluster/ddata/javadsl/ReplicatorTest.java b/akka-cluster-typed/src/test/java/akka/cluster/ddata/typed/javadsl/ReplicatorTest.java
similarity index 92%
rename from akka-typed-tests/src/test/java/akka/typed/cluster/ddata/javadsl/ReplicatorTest.java
rename to akka-cluster-typed/src/test/java/akka/cluster/ddata/typed/javadsl/ReplicatorTest.java
index b09d8e8e55..3fcc6ee8cb 100644
--- a/akka-typed-tests/src/test/java/akka/typed/cluster/ddata/javadsl/ReplicatorTest.java
+++ b/akka-cluster-typed/src/test/java/akka/cluster/ddata/typed/javadsl/ReplicatorTest.java
@@ -2,8 +2,10 @@
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata.javadsl;
+package akka.cluster.ddata.typed.javadsl;
+import akka.cluster.ddata.typed.javadsl.Replicator;
+import akka.cluster.ddata.typed.javadsl.ReplicatorSettings;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import java.util.Optional;
@@ -19,13 +21,13 @@ import akka.cluster.ddata.Key;
import akka.cluster.ddata.ReplicatedData;
import akka.testkit.AkkaJUnitActorSystemResource;
import akka.testkit.javadsl.TestKit;
-import akka.typed.ActorRef;
-import akka.typed.Behavior;
-import akka.typed.cluster.ddata.javadsl.Replicator.Command;
-import akka.typed.javadsl.Actor;
-import akka.typed.javadsl.Adapter;
-import akka.typed.javadsl.Actor.MutableBehavior;
-import akka.typed.javadsl.ActorContext;
+import akka.actor.typed.ActorRef;
+import akka.actor.typed.Behavior;
+import akka.cluster.ddata.typed.javadsl.Replicator.Command;
+import akka.actor.typed.javadsl.Actor;
+import akka.actor.typed.javadsl.Adapter;
+import akka.actor.typed.javadsl.Actor.MutableBehavior;
+import akka.actor.typed.javadsl.ActorContext;
public class ReplicatorTest extends JUnitSuite {
@@ -159,7 +161,7 @@ public class ReplicatorTest extends JUnitSuite {
private final ActorSystem system = actorSystemResource.getSystem();
- akka.typed.ActorSystem> typedSystem() {
+ akka.actor.typed.ActorSystem> typedSystem() {
return Adapter.toTyped(system);
}
diff --git a/akka-typed-tests/src/test/java/akka/typed/cluster/ClusterApiTest.java b/akka-cluster-typed/src/test/java/akka/cluster/typed/ClusterApiTest.java
similarity index 97%
rename from akka-typed-tests/src/test/java/akka/typed/cluster/ClusterApiTest.java
rename to akka-cluster-typed/src/test/java/akka/cluster/typed/ClusterApiTest.java
index af8aac1477..9959bfaffb 100644
--- a/akka-typed-tests/src/test/java/akka/typed/cluster/ClusterApiTest.java
+++ b/akka-cluster-typed/src/test/java/akka/cluster/typed/ClusterApiTest.java
@@ -1,7 +1,7 @@
-package akka.typed.cluster;
+package akka.cluster.typed;
import akka.cluster.ClusterEvent;
-import akka.typed.ActorSystem;
+import akka.actor.typed.ActorSystem;
import akka.typed.testkit.TestKitSettings;
import akka.typed.testkit.javadsl.TestProbe;
import com.typesafe.config.Config;
diff --git a/akka-cluster-typed/src/test/resources/application.conf b/akka-cluster-typed/src/test/resources/application.conf
new file mode 100644
index 0000000000..e053d9d956
--- /dev/null
+++ b/akka-cluster-typed/src/test/resources/application.conf
@@ -0,0 +1,21 @@
+akka.loglevel = DEBUG
+akka.actor.debug.lifecycle = off
+
+dispatcher-1 {
+ fork-join-executor {
+ parallelism-min=1
+ parallelism-max=1
+ }
+}
+dispatcher-2 {
+ fork-join-executor {
+ parallelism-min=2
+ parallelism-max=2
+ }
+}
+dispatcher-8 {
+ fork-join-executor {
+ parallelism-min=8
+ parallelism-max=8
+ }
+}
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/ddata/scaladsl/ReplicatorSpec.scala b/akka-cluster-typed/src/test/scala/akka/cluster/ddata/typed/scaladsl/ReplicatorSpec.scala
similarity index 92%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/ddata/scaladsl/ReplicatorSpec.scala
rename to akka-cluster-typed/src/test/scala/akka/cluster/ddata/typed/scaladsl/ReplicatorSpec.scala
index aa7ac21ad2..491e1cecef 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/ddata/scaladsl/ReplicatorSpec.scala
+++ b/akka-cluster-typed/src/test/scala/akka/cluster/ddata/typed/scaladsl/ReplicatorSpec.scala
@@ -1,30 +1,24 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster.ddata.scaladsl
+package akka.cluster.ddata.typed.scaladsl
-import scala.concurrent.duration._
-
-import akka.cluster.Cluster
-
-import akka.cluster.ddata.GCounter
-import akka.cluster.ddata.GCounterKey
-import akka.cluster.ddata.ReplicatedData
-import akka.typed.ActorRef
-import akka.typed.ActorSystem
-import akka.typed.Behavior
-import akka.typed.TypedSpec
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.AskPattern._
-import akka.typed.scaladsl.adapter._
+import akka.actor.Scheduler
+import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, TypedSpec }
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.AskPattern._
+import akka.actor.typed.scaladsl.adapter._
import akka.typed.testkit.TestKitSettings
import akka.typed.testkit.scaladsl._
+import akka.cluster.Cluster
+import akka.cluster.ddata.{ GCounter, GCounterKey, ReplicatedData }
+import akka.cluster.ddata.typed.scaladsl.Replicator._
+import akka.util.Timeout
import com.typesafe.config.ConfigFactory
import org.scalatest.concurrent.Eventually
-import akka.util.Timeout
-import akka.typed.cluster.ddata.scaladsl.Replicator._
-import akka.actor.Scheduler
+
import scala.concurrent.Future
+import scala.concurrent.duration._
object ReplicatorSpec {
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/ClusterApiSpec.scala b/akka-cluster-typed/src/test/scala/akka/cluster/typed/ClusterApiSpec.scala
similarity index 96%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/ClusterApiSpec.scala
rename to akka-cluster-typed/src/test/scala/akka/cluster/typed/ClusterApiSpec.scala
index f3d0556657..e27286c340 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/ClusterApiSpec.scala
+++ b/akka-cluster-typed/src/test/scala/akka/cluster/typed/ClusterApiSpec.scala
@@ -1,13 +1,13 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster
+package akka.cluster.typed
import akka.cluster.ClusterEvent._
import akka.cluster.MemberStatus
-import akka.typed.TypedSpec
-import akka.typed.internal.adapter.ActorSystemAdapter
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.TypedSpec
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.scaladsl.adapter._
import akka.typed.testkit.TestKitSettings
import akka.typed.testkit.scaladsl.TestProbe
import com.typesafe.config.ConfigFactory
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/ClusterSingletonApiSpec.scala b/akka-cluster-typed/src/test/scala/akka/cluster/typed/ClusterSingletonApiSpec.scala
similarity index 90%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/ClusterSingletonApiSpec.scala
rename to akka-cluster-typed/src/test/scala/akka/cluster/typed/ClusterSingletonApiSpec.scala
index afb8b9b14f..6c15d5fb95 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/ClusterSingletonApiSpec.scala
+++ b/akka-cluster-typed/src/test/scala/akka/cluster/typed/ClusterSingletonApiSpec.scala
@@ -1,18 +1,18 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster
+package akka.cluster.typed
import java.nio.charset.StandardCharsets
import akka.actor.ExtendedActorSystem
import akka.serialization.SerializerWithStringManifest
-import akka.typed.internal.adapter.ActorSystemAdapter
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.adapter._
import akka.typed.testkit.TestKitSettings
import akka.typed.testkit.scaladsl.TestProbe
-import akka.typed.{ ActorRef, Props, TypedSpec }
+import akka.actor.typed.{ ActorRef, Props, TypedSpec }
import com.typesafe.config.ConfigFactory
import org.scalatest.concurrent.ScalaFutures
@@ -29,12 +29,12 @@ object ClusterSingletonApiSpec {
allow-java-serialization = off
serializers {
- test = "akka.typed.cluster.ClusterSingletonApiSpec$$PingSerializer"
+ test = "akka.cluster.typed.ClusterSingletonApiSpec$$PingSerializer"
}
serialization-bindings {
- "akka.typed.cluster.ClusterSingletonApiSpec$$Ping" = test
- "akka.typed.cluster.ClusterSingletonApiSpec$$Pong$$" = test
- "akka.typed.cluster.ClusterSingletonApiSpec$$Perish$$" = test
+ "akka.cluster.typed.ClusterSingletonApiSpec$$Ping" = test
+ "akka.cluster.typed.ClusterSingletonApiSpec$$Pong$$" = test
+ "akka.cluster.typed.ClusterSingletonApiSpec$$Perish$$" = test
}
}
akka.remote.netty.tcp.port = 0
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/ClusterSingletonPersistenceSpec.scala b/akka-cluster-typed/src/test/scala/akka/cluster/typed/ClusterSingletonPersistenceSpec.scala
similarity index 87%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/ClusterSingletonPersistenceSpec.scala
rename to akka-cluster-typed/src/test/scala/akka/cluster/typed/ClusterSingletonPersistenceSpec.scala
index 7609a9e2d9..95b4c3e853 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/ClusterSingletonPersistenceSpec.scala
+++ b/akka-cluster-typed/src/test/scala/akka/cluster/typed/ClusterSingletonPersistenceSpec.scala
@@ -2,13 +2,14 @@
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster
+package akka.cluster.typed
-import akka.typed.ActorRef
-import akka.typed.Behavior
-import akka.typed.Props
-import akka.typed.TypedSpec
-import akka.typed.persistence.scaladsl.PersistentActor
+import akka.actor.typed.ActorRef
+import akka.actor.typed.Behavior
+import akka.actor.typed.Props
+import akka.actor.typed.TypedSpec
+import akka.persistence.typed.scaladsl.PersistentActor
+import akka.persistence.typed.scaladsl.PersistentActor.{ CommandHandler, Effect }
import akka.typed.testkit.TestKitSettings
import akka.typed.testkit.scaladsl.TestProbe
import com.typesafe.config.ConfigFactory
@@ -39,8 +40,6 @@ object ClusterSingletonPersistenceSpec {
final case class Get(replyTo: ActorRef[String]) extends Command
private final case object StopPlz extends Command
- import PersistentActor._
-
val persistentActor: Behavior[Command] =
PersistentActor.immutable[Command, String, String](
persistenceId = "TheSingleton",
@@ -58,7 +57,7 @@ object ClusterSingletonPersistenceSpec {
class ClusterSingletonPersistenceSpec extends TypedSpec(ClusterSingletonPersistenceSpec.config) with ScalaFutures {
import ClusterSingletonPersistenceSpec._
- import akka.typed.scaladsl.adapter._
+ import akka.actor.typed.scaladsl.adapter._
implicit val s = system
implicit val testkitSettings = TestKitSettings(system)
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/RemoteMessageSpec.scala b/akka-cluster-typed/src/test/scala/akka/cluster/typed/RemoteMessageSpec.scala
similarity index 87%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/RemoteMessageSpec.scala
rename to akka-cluster-typed/src/test/scala/akka/cluster/typed/RemoteMessageSpec.scala
index 254f82d6f6..e7aee9c7a6 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/RemoteMessageSpec.scala
+++ b/akka-cluster-typed/src/test/scala/akka/cluster/typed/RemoteMessageSpec.scala
@@ -1,19 +1,22 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.cluster
+package akka.cluster.typed
import java.nio.charset.StandardCharsets
import akka.Done
+import akka.actor.{ ExtendedActorSystem, ActorSystem ⇒ UntypedActorSystem }
+import akka.serialization.SerializerWithStringManifest
import akka.testkit.AkkaSpec
-import akka.typed.{ ActorRef, ActorSystem }
-import akka.typed.scaladsl.Actor
+import akka.actor.typed.{ ActorRef, ActorSystem }
+import akka.actor.typed.scaladsl.Actor
import akka.actor.{ ExtendedActorSystem, ActorSystem ⇒ UntypedActorSystem }
import akka.serialization.{ BaseSerializer, SerializerWithStringManifest }
import com.typesafe.config.ConfigFactory
+
import scala.concurrent.Promise
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.scaladsl.adapter._
class PingSerializer(system: ExtendedActorSystem) extends SerializerWithStringManifest {
override def identifier = 41
@@ -39,10 +42,10 @@ object RemoteMessageSpec {
warn-about-java-serializer-usage = off
serialize-creators = off
serializers {
- test = "akka.typed.cluster.PingSerializer"
+ test = "akka.cluster.typed.PingSerializer"
}
serialization-bindings {
- "akka.typed.cluster.RemoteMessageSpec$$Ping" = test
+ "akka.cluster.typed.RemoteMessageSpec$$Ping" = test
}
}
remote.artery {
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/internal/MiscMessageSerializerSpec.scala b/akka-cluster-typed/src/test/scala/akka/cluster/typed/internal/MiscMessageSerializerSpec.scala
similarity index 84%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/internal/MiscMessageSerializerSpec.scala
rename to akka-cluster-typed/src/test/scala/akka/cluster/typed/internal/MiscMessageSerializerSpec.scala
index 01ca2830a3..1eabfb4748 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/internal/MiscMessageSerializerSpec.scala
+++ b/akka-cluster-typed/src/test/scala/akka/cluster/typed/internal/MiscMessageSerializerSpec.scala
@@ -1,14 +1,14 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster.internal
+package akka.cluster.typed.internal
import akka.serialization.{ SerializationExtension, SerializerWithStringManifest }
-import akka.typed.{ ActorRef, TypedSpec }
-import akka.typed.TypedSpec.Create
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.adapter._
-import akka.typed.scaladsl.AskPattern._
+import akka.actor.typed.{ ActorRef, TypedSpec }
+import akka.actor.typed.TypedSpec.Create
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.adapter._
+import akka.actor.typed.scaladsl.AskPattern._
import com.typesafe.config.ConfigFactory
object MiscMessageSerializerSpec {
diff --git a/akka-typed-tests/src/test/scala/akka/typed/cluster/receptionist/ClusterReceptionistSpec.scala b/akka-cluster-typed/src/test/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionistSpec.scala
similarity index 80%
rename from akka-typed-tests/src/test/scala/akka/typed/cluster/receptionist/ClusterReceptionistSpec.scala
rename to akka-cluster-typed/src/test/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionistSpec.scala
index f1e8f316b0..95e45c7834 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/cluster/receptionist/ClusterReceptionistSpec.scala
+++ b/akka-cluster-typed/src/test/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionistSpec.scala
@@ -1,24 +1,26 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc.
*/
-package akka.typed.cluster.receptionist
+package akka.cluster.typed.internal.receptionist
import java.nio.charset.StandardCharsets
import akka.actor.ExtendedActorSystem
import akka.cluster.Cluster
+import akka.cluster.typed.ActorRefResolver
import akka.serialization.SerializerWithStringManifest
-import akka.typed.ActorRef
-import akka.typed.ActorSystem
-import akka.typed.TypedSpec
-import akka.typed.TypedSpec.Command
-import akka.typed.cluster.ActorRefResolver
-import akka.typed.internal.adapter.ActorRefAdapter
-import akka.typed.internal.adapter.ActorSystemAdapter
-import akka.typed.internal.receptionist.ReceptionistImpl
-import akka.typed.receptionist.Receptionist
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.ActorRef
+import akka.actor.typed.ActorSystem
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.TypedSpec
+import akka.actor.typed.TypedSpec.Command
+import akka.cluster.typed.ActorRefResolver
+import akka.actor.typed.internal.adapter.ActorRefAdapter
+import akka.actor.typed.internal.adapter.ActorSystemAdapter
+import akka.actor.typed.internal.receptionist.ReceptionistImpl
+import akka.actor.typed.receptionist.Receptionist
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.adapter._
import akka.typed.testkit.TestKitSettings
import akka.typed.testkit.scaladsl.TestProbe
import com.typesafe.config.ConfigFactory
@@ -34,12 +36,12 @@ object ClusterReceptionistSpec {
serialize-messages = off
allow-java-serialization = true
serializers {
- test = "akka.typed.cluster.receptionist.ClusterReceptionistSpec$$PingSerializer"
+ test = "akka.cluster.typed.internal.receptionist.ClusterReceptionistSpec$$PingSerializer"
}
serialization-bindings {
- "akka.typed.cluster.receptionist.ClusterReceptionistSpec$$Ping" = test
- "akka.typed.cluster.receptionist.ClusterReceptionistSpec$$Pong$$" = test
- "akka.typed.cluster.receptionist.ClusterReceptionistSpec$$Perish$$" = test
+ "akka.cluster.typed.internal.receptionist.ClusterReceptionistSpec$$Ping" = test
+ "akka.cluster.typed.internal.receptionist.ClusterReceptionistSpec$$Pong$$" = test
+ "akka.cluster.typed.internal.receptionist.ClusterReceptionistSpec$$Perish$$" = test
# for now, using Java serializers is good enough (tm), see #23687
# "akka.typed.internal.receptionist.ReceptionistImpl$$DefaultServiceKey" = test
}
diff --git a/akka-docs/src/main/paradox/typed.md b/akka-docs/src/main/paradox/typed.md
index 217262eb9a..fe8be57bd5 100644
--- a/akka-docs/src/main/paradox/typed.md
+++ b/akka-docs/src/main/paradox/typed.md
@@ -11,13 +11,13 @@ This module is currently marked as @ref:[may change](common/may-change.md) in th
## Dependency
-Akka Typed APIs are bundled in the `akka-typed` artifact.
-Make sure that you have the following dependency in your project:
+Akka Typed APIs for each akka module are in a `akka-$module-typed` e.g. `akka-actor-typed` `akka-persistence-typed`
+For the following examples make sure that you have the following dependency in your project:
sbt
: @@@vars
```
- "com.typesafe.akka" %% "akka-typed" % "$akka.version$"
+ "com.typesafe.akka" %% "akka-actor-typed" % "$akka.version$"
```
@@@
@@ -25,7 +25,7 @@ Gradle
: @@@vars
```
dependencies {
- compile group: 'com.typesafe.akka', name: 'akka-typed_2.11', version: '$akka.version$'
+ compile group: 'com.typesafe.akka', name: 'akka-actor-typed_2.11', version: '$akka.version$'
}
```
@@@
@@ -35,7 +35,7 @@ Maven
```
com.typesafe.akka
- akka-typed_$scala.binary_version$
+ akka-actor-typed_$scala.binary_version$
$akka.version$
```
@@ -48,19 +48,19 @@ sending messages between independent units of computation, but how does that
look like? In all of the following these imports are assumed:
Scala
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #imports }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #imports }
Java
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #imports }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #imports }
With these in place we can define our first Actor, and of course it will say
hello!
Scala
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #hello-world-actor }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #hello-world-actor }
Java
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #hello-world-actor }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #hello-world-actor }
This small piece of code defines two message types, one for commanding the
Actor to greet someone and one that the Actor will use to confirm that it has
@@ -97,10 +97,10 @@ wrapped scope—the `HelloWorld` @scala[object]@java[class].
Now we want to try out this Actor, so we must start an ActorSystem to host it:
Scala
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #hello-world }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #hello-world }
Java
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #hello-world }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #hello-world }
After importing the Actor’s protocol definition we start an Actor system from
the defined `greeter` behavior.
@@ -219,10 +219,10 @@ chat room Actor will disseminate all posted messages to all currently connected
client Actors. The protocol definition could look like the following:
Scala
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #chatroom-protocol }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #chatroom-protocol }
Java
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #chatroom-protocol }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #chatroom-protocol }
Initially the client Actors only get access to an @scala[`ActorRef[GetSession]`]@java[`ActorRef`]
which allows them to make the first step. Once a client’s session has been
@@ -240,10 +240,10 @@ multiple steps. The implementation of the chat room protocol would be as simple
as the following:
Scala
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #chatroom-behavior }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #chatroom-behavior }
Java
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #chatroom-behavior }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #chatroom-behavior }
The core of this behavior is stateful, the chat room itself does not change
into something else when sessions are established, but we introduce a variable
@@ -285,10 +285,10 @@ problematic, so passing an @scala[`ActorRef[PostSessionMessage]`]@java[`ActorRef
In order to see this chat room in action we need to write a client Actor that can use it:
Scala
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #chatroom-gabbler }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #chatroom-gabbler }
Java
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #chatroom-gabbler }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #chatroom-gabbler }
From this behavior we can create an Actor that will accept a chat room session,
post a message, wait to see it published, and then terminate. The last step
@@ -313,10 +313,10 @@ nonsensical) or we start both of them from a third Actor—our only sensible
choice:
Scala
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #chatroom-main }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/scala/docs/akka/typed/IntroSpec.scala) { #chatroom-main }
Java
-: @@snip [IntroSpec.scala]($akka$/akka-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #chatroom-main }
+: @@snip [IntroSpec.scala]($akka$/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/IntroTest.java) { #chatroom-main }
In good tradition we call the `main` Actor what it is, it directly
corresponds to the `main` method in a traditional Java application. This
diff --git a/akka-persistence-typed/src/main/resources/reference.conf b/akka-persistence-typed/src/main/resources/reference.conf
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/akka-typed/src/main/scala/akka/typed/persistence/internal/PersistentActorImpl.scala b/akka-persistence-typed/src/main/scala/akka/persistence/typed/internal/PersistentActorImpl.scala
similarity index 91%
rename from akka-typed/src/main/scala/akka/typed/persistence/internal/PersistentActorImpl.scala
rename to akka-persistence-typed/src/main/scala/akka/persistence/typed/internal/PersistentActorImpl.scala
index 5985571103..13071eb6c5 100644
--- a/akka-typed/src/main/scala/akka/typed/persistence/internal/PersistentActorImpl.scala
+++ b/akka-persistence-typed/src/main/scala/akka/persistence/typed/internal/PersistentActorImpl.scala
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.persistence.internal
+package akka.persistence.typed.internal
import akka.{ actor ⇒ a }
import akka.annotation.InternalApi
@@ -9,13 +9,13 @@ import akka.event.Logging
import akka.persistence.{ PersistentActor ⇒ UntypedPersistentActor }
import akka.persistence.RecoveryCompleted
import akka.persistence.SnapshotOffer
-import akka.typed.Signal
-import akka.typed.internal.adapter.ActorContextAdapter
-import akka.typed.persistence.scaladsl.PersistentActor
-import akka.typed.persistence.scaladsl.PersistentBehavior
-import akka.typed.scaladsl.ActorContext
-import akka.typed.Terminated
-import akka.typed.internal.adapter.ActorRefAdapter
+import akka.actor.typed.Signal
+import akka.actor.typed.internal.adapter.ActorContextAdapter
+import akka.persistence.typed.scaladsl.PersistentActor
+import akka.persistence.typed.scaladsl.PersistentBehavior
+import akka.actor.typed.scaladsl.ActorContext
+import akka.actor.typed.Terminated
+import akka.actor.typed.internal.adapter.ActorRefAdapter
/**
* INTERNAL API
@@ -44,8 +44,6 @@ import akka.typed.internal.adapter.ActorRefAdapter
import PersistentActorImpl._
import PersistentActor._
- private val log = Logging(context.system, behavior.getClass)
-
override val persistenceId: String = behavior.persistenceIdFromActorName(self.path.name)
private var state: S = behavior.initialState
diff --git a/akka-typed/src/main/scala/akka/typed/persistence/scaladsl/PersistentActor.scala b/akka-persistence-typed/src/main/scala/akka/persistence/typed/scaladsl/PersistentActor.scala
similarity index 97%
rename from akka-typed/src/main/scala/akka/typed/persistence/scaladsl/PersistentActor.scala
rename to akka-persistence-typed/src/main/scala/akka/persistence/typed/scaladsl/PersistentActor.scala
index 5f3292bcf9..7c738ef31b 100644
--- a/akka-typed/src/main/scala/akka/typed/persistence/scaladsl/PersistentActor.scala
+++ b/akka-persistence-typed/src/main/scala/akka/persistence/typed/scaladsl/PersistentActor.scala
@@ -1,14 +1,14 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.persistence.scaladsl
+package akka.persistence.typed.scaladsl
import scala.collection.{ immutable ⇒ im }
import akka.annotation.{ ApiMayChange, DoNotInherit, InternalApi }
-import akka.typed.Behavior.UntypedBehavior
-import akka.typed.Signal
-import akka.typed.persistence.internal.PersistentActorImpl
-import akka.typed.scaladsl.ActorContext
+import akka.actor.typed.Behavior.UntypedBehavior
+import akka.actor.typed.Signal
+import akka.persistence.typed.internal.PersistentActorImpl
+import akka.actor.typed.scaladsl.ActorContext
object PersistentActor {
diff --git a/akka-persistence-typed/src/test/resources/application.conf b/akka-persistence-typed/src/test/resources/application.conf
new file mode 100644
index 0000000000..e053d9d956
--- /dev/null
+++ b/akka-persistence-typed/src/test/resources/application.conf
@@ -0,0 +1,21 @@
+akka.loglevel = DEBUG
+akka.actor.debug.lifecycle = off
+
+dispatcher-1 {
+ fork-join-executor {
+ parallelism-min=1
+ parallelism-max=1
+ }
+}
+dispatcher-2 {
+ fork-join-executor {
+ parallelism-min=2
+ parallelism-max=2
+ }
+}
+dispatcher-8 {
+ fork-join-executor {
+ parallelism-min=8
+ parallelism-max=8
+ }
+}
diff --git a/akka-typed-tests/src/test/scala/akka/typed/persistence/scaladsl/PersistentActorCompileOnlyTest.scala b/akka-persistence-typed/src/test/scala/akka/persistence/typed/scaladsl/PersistentActorCompileOnlyTest.scala
similarity index 97%
rename from akka-typed-tests/src/test/scala/akka/typed/persistence/scaladsl/PersistentActorCompileOnlyTest.scala
rename to akka-persistence-typed/src/test/scala/akka/persistence/typed/scaladsl/PersistentActorCompileOnlyTest.scala
index 4e116c3cc4..326a703313 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/persistence/scaladsl/PersistentActorCompileOnlyTest.scala
+++ b/akka-persistence-typed/src/test/scala/akka/persistence/typed/scaladsl/PersistentActorCompileOnlyTest.scala
@@ -1,21 +1,20 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.persistence.scaladsl
+package akka.persistence.typed.scaladsl
import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
-
-import akka.typed.ActorRef
-import akka.typed.Behavior
-import akka.typed.Terminated
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.ActorContext
-import akka.typed.scaladsl.TimerScheduler
+import akka.actor.typed.ActorRef
+import akka.actor.typed.Behavior
+import akka.actor.typed.Terminated
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.ActorContext
+import akka.actor.typed.scaladsl.TimerScheduler
object PersistentActorCompileOnlyTest {
- import akka.typed.persistence.scaladsl.PersistentActor._
+ import akka.persistence.typed.scaladsl.PersistentActor._
object Simple {
sealed trait MyCommand
@@ -83,7 +82,7 @@ object PersistentActorCompileOnlyTest {
val sideEffectProcessor: ActorRef[Request] = ???
def performSideEffect(sender: ActorRef[AcknowledgeSideEffect], correlationId: Int, data: String) = {
- import akka.typed.scaladsl.AskPattern._
+ import akka.actor.typed.scaladsl.AskPattern._
implicit val timeout: akka.util.Timeout = 1.second
implicit val scheduler: akka.actor.Scheduler = ???
implicit val ec: ExecutionContext = ???
diff --git a/akka-typed-tests/src/test/scala/akka/typed/persistence/scaladsl/PersistentActorSpec.scala b/akka-persistence-typed/src/test/scala/akka/persistence/typed/scaladsl/PersistentActorSpec.scala
similarity index 94%
rename from akka-typed-tests/src/test/scala/akka/typed/persistence/scaladsl/PersistentActorSpec.scala
rename to akka-persistence-typed/src/test/scala/akka/persistence/typed/scaladsl/PersistentActorSpec.scala
index cd411392dc..c59dffdaf4 100644
--- a/akka-typed-tests/src/test/scala/akka/typed/persistence/scaladsl/PersistentActorSpec.scala
+++ b/akka-persistence-typed/src/test/scala/akka/persistence/typed/scaladsl/PersistentActorSpec.scala
@@ -1,25 +1,24 @@
/**
* Copyright (C) 2017 Lightbend Inc.
*/
-package akka.typed.persistence.scaladsl
+package akka.persistence.typed.scaladsl
import scala.concurrent.duration._
-
-import akka.typed.ActorRef
-import akka.typed.ActorSystem
-import akka.typed.Behavior
-import akka.typed.TypedSpec
-import akka.typed.scaladsl.Actor
-import akka.typed.scaladsl.AskPattern._
-import akka.typed.scaladsl.adapter._
+import akka.actor.typed.ActorRef
+import akka.actor.typed.ActorSystem
+import akka.actor.typed.Behavior
+import akka.actor.typed.TypedSpec
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.AskPattern._
+import akka.actor.typed.scaladsl.adapter._
import akka.typed.testkit.TestKitSettings
import akka.typed.testkit.scaladsl._
import com.typesafe.config.ConfigFactory
import org.scalatest.concurrent.Eventually
import akka.util.Timeout
-import akka.typed.persistence.scaladsl.PersistentActor._
-import akka.typed.SupervisorStrategy
-import akka.typed.Terminated
+import akka.persistence.typed.scaladsl.PersistentActor._
+import akka.actor.typed.SupervisorStrategy
+import akka.actor.typed.Terminated
object PersistentActorSpec {
diff --git a/akka-typed-testkit/src/main/resources/reference.conf b/akka-testkit-typed/src/main/resources/reference.conf
similarity index 96%
rename from akka-typed-testkit/src/main/resources/reference.conf
rename to akka-testkit-typed/src/main/resources/reference.conf
index 1230df0591..173da9cc26 100644
--- a/akka-typed-testkit/src/main/resources/reference.conf
+++ b/akka-testkit-typed/src/main/resources/reference.conf
@@ -5,7 +5,7 @@
# This is the reference config file that contains all the default settings.
# Make your edits/overrides in your application.conf.
-akka.typed.test {
+akka.actor.typed.test {
# factor by which to scale timeouts during tests, e.g. to account for shared
# build system load
timefactor = 1.0
diff --git a/akka-typed-testkit/src/main/scala/akka/typed/testkit/Effects.scala b/akka-testkit-typed/src/main/scala/akka/typed/testkit/Effects.scala
similarity index 97%
rename from akka-typed-testkit/src/main/scala/akka/typed/testkit/Effects.scala
rename to akka-testkit-typed/src/main/scala/akka/typed/testkit/Effects.scala
index c551dc42f3..b13aa51fa3 100644
--- a/akka-typed-testkit/src/main/scala/akka/typed/testkit/Effects.scala
+++ b/akka-testkit-typed/src/main/scala/akka/typed/testkit/Effects.scala
@@ -5,7 +5,7 @@ package akka.typed.testkit
import java.util.concurrent.ConcurrentLinkedQueue
-import akka.typed.{ ActorContext, ActorRef, ActorSystem, Behavior, PostStop, Props, Signal }
+import akka.actor.typed.{ ActorContext, ActorRef, ActorSystem, Behavior, PostStop, Props, Signal }
import scala.annotation.tailrec
import scala.collection.immutable
diff --git a/akka-typed-testkit/src/main/scala/akka/typed/testkit/Inbox.scala b/akka-testkit-typed/src/main/scala/akka/typed/testkit/Inbox.scala
similarity index 89%
rename from akka-typed-testkit/src/main/scala/akka/typed/testkit/Inbox.scala
rename to akka-testkit-typed/src/main/scala/akka/typed/testkit/Inbox.scala
index 42cd305b50..0853580103 100644
--- a/akka-typed-testkit/src/main/scala/akka/typed/testkit/Inbox.scala
+++ b/akka-testkit-typed/src/main/scala/akka/typed/testkit/Inbox.scala
@@ -6,7 +6,7 @@ package akka.typed.testkit
import java.util.concurrent.{ ConcurrentLinkedQueue, ThreadLocalRandom }
import akka.actor.{ Address, RootActorPath }
-import akka.typed.{ ActorRef, internal }
+import akka.actor.typed.{ ActorRef, internal }
import scala.annotation.tailrec
import scala.collection.immutable
@@ -23,7 +23,7 @@ class Inbox[T](name: String) {
val ref: ActorRef[T] = {
val uid = ThreadLocalRandom.current().nextInt()
- val path = RootActorPath(Address("akka.typed.inbox", "anonymous")).child(name).withUid(uid)
+ val path = RootActorPath(Address("akka.actor.typed.inbox", "anonymous")).child(name).withUid(uid)
new internal.FunctionRef[T](path, (msg, self) ⇒ q.add(msg), (self) ⇒ ())
}
diff --git a/akka-typed-testkit/src/main/scala/akka/typed/testkit/StubbedActorContext.scala b/akka-testkit-typed/src/main/scala/akka/typed/testkit/StubbedActorContext.scala
similarity index 98%
rename from akka-typed-testkit/src/main/scala/akka/typed/testkit/StubbedActorContext.scala
rename to akka-testkit-typed/src/main/scala/akka/typed/testkit/StubbedActorContext.scala
index 4bbc5c361b..e308c612e9 100644
--- a/akka-typed-testkit/src/main/scala/akka/typed/testkit/StubbedActorContext.scala
+++ b/akka-testkit-typed/src/main/scala/akka/typed/testkit/StubbedActorContext.scala
@@ -1,14 +1,14 @@
package akka.typed.testkit
import akka.{ actor ⇒ untyped }
-import akka.typed._
+import akka.actor.typed._
import akka.util.Helpers
import scala.collection.immutable.TreeMap
import scala.concurrent.ExecutionContextExecutor
import scala.concurrent.duration.FiniteDuration
import akka.annotation.InternalApi
-import akka.typed.internal.ActorContextImpl
+import akka.actor.typed.internal.ActorContextImpl
/**
* An [[ActorContext]] for synchronous execution of a [[Behavior]] that
diff --git a/akka-typed-testkit/src/main/scala/akka/typed/testkit/TestEventListener.scala b/akka-testkit-typed/src/main/scala/akka/typed/testkit/TestEventListener.scala
similarity index 96%
rename from akka-typed-testkit/src/main/scala/akka/typed/testkit/TestEventListener.scala
rename to akka-testkit-typed/src/main/scala/akka/typed/testkit/TestEventListener.scala
index faebf639d9..576a450f83 100644
--- a/akka-typed-testkit/src/main/scala/akka/typed/testkit/TestEventListener.scala
+++ b/akka-testkit-typed/src/main/scala/akka/typed/testkit/TestEventListener.scala
@@ -6,8 +6,8 @@ import akka.typed.Logger
import akka.typed.Logger.{ Command, Initialize }
import scala.annotation.tailrec
-import akka.typed.scaladsl.Actor
-import akka.typed.Behavior
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.Behavior
/**
* EventListener for running tests, which allows selectively filtering out
diff --git a/akka-typed-testkit/src/main/scala/akka/typed/testkit/TestKitSettings.scala b/akka-testkit-typed/src/main/scala/akka/typed/testkit/TestKitSettings.scala
similarity index 59%
rename from akka-typed-testkit/src/main/scala/akka/typed/testkit/TestKitSettings.scala
rename to akka-testkit-typed/src/main/scala/akka/typed/testkit/TestKitSettings.scala
index 3cfa588d65..837be00799 100644
--- a/akka-typed-testkit/src/main/scala/akka/typed/testkit/TestKitSettings.scala
+++ b/akka-testkit-typed/src/main/scala/akka/typed/testkit/TestKitSettings.scala
@@ -6,18 +6,18 @@ package akka.typed.testkit
import com.typesafe.config.Config
import scala.concurrent.duration.FiniteDuration
import akka.util.Timeout
-import akka.typed.ActorSystem
+import akka.actor.typed.ActorSystem
object TestKitSettings {
/**
- * Reads configuration settings from `akka.typed.test` section.
+ * Reads configuration settings from `akka.actor.typed.test` section.
*/
def apply(system: ActorSystem[_]): TestKitSettings =
apply(system.settings.config)
/**
* Reads configuration settings from given `Config` that
- * must have the same layout as the `akka.typed.test` section.
+ * must have the same layout as the `akka.actor.typed.test` section.
*/
def apply(config: Config): TestKitSettings =
new TestKitSettings(config)
@@ -27,8 +27,8 @@ class TestKitSettings(val config: Config) {
import akka.util.Helpers._
- val TestTimeFactor = config.getDouble("akka.typed.test.timefactor").
- requiring(tf ⇒ !tf.isInfinite && tf > 0, "akka.typed.test.timefactor must be positive finite double")
- val SingleExpectDefaultTimeout: FiniteDuration = config.getMillisDuration("akka.typed.test.single-expect-default")
- val DefaultTimeout: Timeout = Timeout(config.getMillisDuration("akka.typed.test.default-timeout"))
+ val TestTimeFactor = config.getDouble("akka.actor.typed.test.timefactor").
+ requiring(tf ⇒ !tf.isInfinite && tf > 0, "akka.actor.typed.test.timefactor must be positive finite double")
+ val SingleExpectDefaultTimeout: FiniteDuration = config.getMillisDuration("akka.actor.typed.test.single-expect-default")
+ val DefaultTimeout: Timeout = Timeout(config.getMillisDuration("akka.actor.typed.test.default-timeout"))
}
diff --git a/akka-typed-testkit/src/main/scala/akka/typed/testkit/javadsl/TestProbe.scala b/akka-testkit-typed/src/main/scala/akka/typed/testkit/javadsl/TestProbe.scala
similarity index 94%
rename from akka-typed-testkit/src/main/scala/akka/typed/testkit/javadsl/TestProbe.scala
rename to akka-testkit-typed/src/main/scala/akka/typed/testkit/javadsl/TestProbe.scala
index 01a3fac9f2..5df96acf32 100644
--- a/akka-typed-testkit/src/main/scala/akka/typed/testkit/javadsl/TestProbe.scala
+++ b/akka-testkit-typed/src/main/scala/akka/typed/testkit/javadsl/TestProbe.scala
@@ -3,7 +3,7 @@
*/
package akka.typed.testkit.javadsl
-import akka.typed.ActorSystem
+import akka.actor.typed.ActorSystem
import akka.typed.testkit.TestKitSettings
/**
diff --git a/akka-typed-testkit/src/main/scala/akka/typed/testkit/scaladsl/TestProbe.scala b/akka-testkit-typed/src/main/scala/akka/typed/testkit/scaladsl/TestProbe.scala
similarity index 96%
rename from akka-typed-testkit/src/main/scala/akka/typed/testkit/scaladsl/TestProbe.scala
rename to akka-testkit-typed/src/main/scala/akka/typed/testkit/scaladsl/TestProbe.scala
index f3c96e0ebe..e7c068f7c5 100644
--- a/akka-typed-testkit/src/main/scala/akka/typed/testkit/scaladsl/TestProbe.scala
+++ b/akka-testkit-typed/src/main/scala/akka/typed/testkit/scaladsl/TestProbe.scala
@@ -6,13 +6,13 @@ package akka.typed.testkit.scaladsl
import scala.concurrent.duration._
import java.util.concurrent.BlockingDeque
-import akka.typed.Behavior
-import akka.typed.scaladsl.Actor
-import akka.typed.ActorSystem
+import akka.actor.typed.Behavior
+import akka.actor.typed.scaladsl.Actor
+import akka.actor.typed.ActorSystem
import java.util.concurrent.LinkedBlockingDeque
import java.util.concurrent.atomic.AtomicInteger
-import akka.typed.ActorRef
+import akka.actor.typed.ActorRef
import akka.util.Timeout
import akka.util.PrettyDuration.PrettyPrintableDuration
@@ -74,7 +74,7 @@ class TestProbe[M](name: String)(implicit val system: ActorSystem[_], val settin
/**
* Obtain time remaining for execution of the innermost enclosing `within`
* block or missing that it returns the properly dilated default for this
- * case from settings (key "akka.typed.test.single-expect-default").
+ * case from settings (key "akka.actor.typed.test.single-expect-default").
*/
def remainingOrDefault = remainingOr(settings.SingleExpectDefaultTimeout.dilated)
@@ -111,7 +111,7 @@ class TestProbe[M](name: String)(implicit val system: ActorSystem[_], val settin
* the remaining time governed by the innermost enclosing `within` block.
*
* Note that the timeout is scaled using Duration.dilated, which uses the
- * configuration entry "akka.typed.test.timefactor", while the min Duration is not.
+ * configuration entry "akka.actor.typed.test.timefactor", while the min Duration is not.
*
* {{{
* val ret = within(50 millis) {
diff --git a/akka-typed-testkit/src/main/scala/akka/typed/testkit/scaladsl/package.scala b/akka-testkit-typed/src/main/scala/akka/typed/testkit/scaladsl/package.scala
similarity index 96%
rename from akka-typed-testkit/src/main/scala/akka/typed/testkit/scaladsl/package.scala
rename to akka-testkit-typed/src/main/scala/akka/typed/testkit/scaladsl/package.scala
index 81053e8c94..652454e124 100644
--- a/akka-typed-testkit/src/main/scala/akka/typed/testkit/scaladsl/package.scala
+++ b/akka-testkit-typed/src/main/scala/akka/typed/testkit/scaladsl/package.scala
@@ -7,7 +7,7 @@ import scala.concurrent.duration.{ Duration, FiniteDuration }
import scala.reflect.ClassTag
import scala.collection.immutable
import java.util.concurrent.TimeUnit.MILLISECONDS
-import akka.typed.ActorSystem
+import akka.actor.typed.ActorSystem
package object scaladsl {
diff --git a/akka-typed-testkit/src/test/scala/akka/typed/testkit/EffectfulActorContextSpec.scala b/akka-testkit-typed/src/test/scala/akka/typed/testkit/EffectfulActorContextSpec.scala
similarity index 98%
rename from akka-typed-testkit/src/test/scala/akka/typed/testkit/EffectfulActorContextSpec.scala
rename to akka-testkit-typed/src/test/scala/akka/typed/testkit/EffectfulActorContextSpec.scala
index 9a6ce3585f..09efd00e13 100644
--- a/akka-typed-testkit/src/test/scala/akka/typed/testkit/EffectfulActorContextSpec.scala
+++ b/akka-testkit-typed/src/test/scala/akka/typed/testkit/EffectfulActorContextSpec.scala
@@ -4,11 +4,11 @@
package akka.typed.testkit
-import akka.typed.scaladsl.Actor
+import akka.actor.typed.scaladsl.Actor
import akka.typed.testkit.Effect.{ Spawned, SpawnedAdapter, SpawnedAnonymous }
import akka.typed.testkit.EffectfulActorContextSpec.Father
import akka.typed.testkit.EffectfulActorContextSpec.Father._
-import akka.typed.{ ActorSystem, Behavior, Props }
+import akka.actor.typed.{ ActorSystem, Behavior, Props }
import org.scalatest.{ FlatSpec, Matchers }
object EffectfulActorContextSpec {
diff --git a/akka-typed-tests/src/test/resources/reference.conf b/akka-typed-tests/src/test/resources/reference.conf
deleted file mode 100644
index fd19764c9e..0000000000
--- a/akka-typed-tests/src/test/resources/reference.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-akka.typed {
- # for the akka.actor.ExtensionSpec
- library-extensions += "akka.typed.InstanceCountingExtension"
-}
\ No newline at end of file
diff --git a/build.sbt b/build.sbt
index 16fc2302b7..a6e026503f 100644
--- a/build.sbt
+++ b/build.sbt
@@ -37,7 +37,7 @@ lazy val aggregatedProjects: Seq[ProjectReference] = Seq(
slf4j,
stream, streamTestkit, streamTests, streamTestsTck,
testkit,
- typed, typedTests, typedTestkit
+ actorTyped, actorTypedTests, typedTestkit, persistenceTyped, clusterTyped, clusterShardingTyped
)
lazy val root = Project(
@@ -189,8 +189,11 @@ lazy val docs = akkaModule("akka-docs")
testkit % "compile->compile;test->test",
remote % "compile->compile;test->test",
persistence % "compile->compile;provided->provided;test->test",
- typed % "compile->compile;test->test",
- typedTests % "compile->compile;test->test",
+ actorTyped % "compile->compile;test->test",
+ persistenceTyped % "compile->compile;test->test",
+ clusterTyped % "compile->compile;test->test",
+ clusterShardingTyped % "compile->compile;test->test",
+ actorTypedTests % "compile->compile;test->test",
streamTestkit % "compile->compile;test->test"
)
.settings(Dependencies.docs)
@@ -222,7 +225,7 @@ lazy val docs = akkaModule("akka-docs")
),
paradoxGroups := Map("Language" -> Seq("Scala", "Java")),
resolvers += Resolver.jcenterRepo,
- deployRsyncArtifact := List((paradox in Compile).value -> s"www/docs/akka/${version.value}"),
+ deployRsyncArtifact := List((paradox in Compile).value -> s"www/docs/akka/${version.value}")
)
.enablePlugins(AkkaParadoxPlugin, DeployRsync, NoPublish, ParadoxBrowse, ScaladocNoVerificationOfDiagrams)
.disablePlugins(MimaPlugin, WhiteSourcePlugin)
@@ -361,19 +364,10 @@ lazy val testkit = akkaModule("akka-testkit")
initialCommands += "import akka.testkit._"
)
-lazy val typed = akkaModule("akka-typed")
- .dependsOn(
- testkit % "compile->compile;test->test",
- persistence % "provided->compile",
- cluster % "provided->compile",
- clusterTools % "provided->compile",
- clusterSharding % "provided->compile",
- distributedData % "provided->compile"
- )
+lazy val actorTyped = akkaModule("akka-actor-typed")
+ .dependsOn(actor)
.settings(AkkaBuild.mayChangeSettings)
- .settings(AutomaticModuleName.settings("akka.typed")) // fine for now, eventually new module name to become typed.actor
- // To be ablet to import ContainerFormats.proto
- .settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "akka-remote" / "src" / "main" / "protobuf" ))
+ .settings(AutomaticModuleName.settings("akka.actor.typed")) // fine for now, eventually new module name to become typed.actor
.settings(
initialCommands := """
import akka.typed._
@@ -386,21 +380,59 @@ lazy val typed = akkaModule("akka-typed")
)
.disablePlugins(MimaPlugin)
-lazy val typedTestkit = akkaModule("akka-typed-testkit")
- .dependsOn(typed, testkit % "compile->compile;test->test")
- .settings(AutomaticModuleName.settings("akka.typed.testkit"))
+lazy val persistenceTyped = akkaModule("akka-persistence-typed")
+ .dependsOn(
+ actorTyped,
+ persistence,
+ testkit % "test->test",
+ typedTestkit % "test->test",
+ actorTypedTests % "test->test"
+ )
+ .settings(AkkaBuild.mayChangeSettings)
+ .settings(AutomaticModuleName.settings("akka.persistence.typed"))
.disablePlugins(MimaPlugin)
-lazy val typedTests = akkaModule("akka-typed-tests")
+lazy val clusterTyped = akkaModule("akka-cluster-typed")
.dependsOn(
- typed,
- typedTestkit % "compile->compile;test->provided;test->test",
- // the provided dependencies
- persistence % "compile->compile;test->test",
- cluster % "test->test",
+ actorTyped,
+ cluster,
clusterTools,
+ distributedData,
+ persistence % "provided->test",
+ persistenceTyped % "provided->test",
+ testkit % "test->test",
+ typedTestkit % "test->test",
+ actorTypedTests % "test->test"
+ )
+ .settings(AkkaBuild.mayChangeSettings)
+ .settings(AutomaticModuleName.settings("akka.cluster.typed"))
+ .disablePlugins(MimaPlugin)
+
+lazy val clusterShardingTyped = akkaModule("akka-cluster-sharding-typed")
+ .dependsOn(
+ clusterTyped,
+ persistenceTyped,
clusterSharding,
- distributedData
+ testkit % "test->test",
+ typedTestkit % "test->test",
+ actorTypedTests % "test->test"
+ )
+ .settings(AkkaBuild.mayChangeSettings)
+ .settings(AutomaticModuleName.settings("akka.cluster.sharding.typed"))
+ // To be able to import ContainerFormats.proto
+ .settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "akka-remote" / "src" / "main" / "protobuf" ))
+ .disablePlugins(MimaPlugin)
+
+
+lazy val typedTestkit = akkaModule("akka-testkit-typed")
+ .dependsOn(actorTyped, testkit % "compile->compile;test->test")
+ .settings(AutomaticModuleName.settings("akka.testkit.typed"))
+ .disablePlugins(MimaPlugin)
+
+lazy val actorTypedTests = akkaModule("akka-actor-typed-tests")
+ .dependsOn(
+ actorTyped,
+ typedTestkit % "compile->compile;test->provided;test->test"
)
.settings(AkkaBuild.mayChangeSettings)
.disablePlugins(MimaPlugin)