diff --git a/akka-actor-tests/src/test/scala/akka/actor/ActorWithStashSpec.scala b/akka-actor-tests/src/test/scala/akka/actor/ActorWithStashSpec.scala index 9bf7ff714b..2a5728bb85 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/ActorWithStashSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/ActorWithStashSpec.scala @@ -149,7 +149,7 @@ class ActorWithStashSpec extends AkkaSpec with DefaultTimeout with BeforeAndAfte val restartLatch = new TestLatch val hasMsgLatch = new TestLatch - val slaveProps = Props(new Actor with Stash { + val employeeProps = Props(new Actor with Stash { def receive = { case "crash" => throw new Exception("Crashing...") @@ -169,10 +169,10 @@ class ActorWithStashSpec extends AkkaSpec with DefaultTimeout with BeforeAndAfte super.preRestart(reason, message) } }) - val slave = Await.result((boss ? slaveProps).mapTo[ActorRef], timeout.duration) + val employee = Await.result((boss ? employeeProps).mapTo[ActorRef], timeout.duration) - slave ! "hello" - slave ! "crash" + employee ! "hello" + employee ! "crash" Await.ready(restartLatch, 10 seconds) Await.ready(hasMsgLatch, 10 seconds) diff --git a/akka-actor-tests/src/test/scala/akka/actor/RestartStrategySpec.scala b/akka-actor-tests/src/test/scala/akka/actor/RestartStrategySpec.scala index 780a69504b..0620759893 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/RestartStrategySpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/RestartStrategySpec.scala @@ -31,7 +31,7 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { "A RestartStrategy" must { - "ensure that slave stays dead after max restarts within time range" in { + "ensure that employee stays dead after max restarts within time range" in { val boss = system.actorOf( Props( new Supervisor(OneForOneStrategy(maxNrOfRetries = 2, withinTimeRange = 1 second)(List(classOf[Throwable]))))) @@ -41,7 +41,7 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { val countDownLatch = new TestLatch(3) val stopLatch = new TestLatch - val slaveProps = Props(new Actor { + val employeeProps = Props(new Actor { def receive = { case Ping => countDownLatch.countDown() @@ -59,32 +59,32 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { stopLatch.open() } }) - val slave = Await.result((boss ? slaveProps).mapTo[ActorRef], timeout.duration) + val employee = Await.result((boss ? employeeProps).mapTo[ActorRef], timeout.duration) - slave ! Ping - slave ! Crash - slave ! Ping + employee ! Ping + employee ! Crash + employee ! Ping // test restart and post restart ping Await.ready(restartLatch, 10 seconds) // now crash again... should not restart - slave ! Crash - slave ! Ping + employee ! Crash + employee ! Ping Await.ready(secondRestartLatch, 10 seconds) Await.ready(countDownLatch, 10 seconds) - slave ! Crash + employee ! Crash Await.ready(stopLatch, 10 seconds) } - "ensure that slave is immortal without max restarts and time range" in { + "ensure that employee is immortal without max restarts and time range" in { val boss = system.actorOf(Props(new Supervisor(OneForOneStrategy()(List(classOf[Throwable]))))) val countDownLatch = new TestLatch(100) - val slaveProps = Props(new Actor { + val employeeProps = Props(new Actor { def receive = { case Crash => throw new Exception("Crashing...") @@ -94,16 +94,16 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { countDownLatch.countDown() } }) - val slave = Await.result((boss ? slaveProps).mapTo[ActorRef], timeout.duration) + val employee = Await.result((boss ? employeeProps).mapTo[ActorRef], timeout.duration) (1 to 100).foreach { _ => - slave ! Crash + employee ! Crash } Await.ready(countDownLatch, 2 minutes) - assert(!slave.isTerminated) + assert(!employee.isTerminated) } - "ensure that slave restarts after number of crashes not within time range" in { + "ensure that employee restarts after number of crashes not within time range" in { val boss = system.actorOf(Props( new Supervisor(OneForOneStrategy(maxNrOfRetries = 2, withinTimeRange = 500 millis)(List(classOf[Throwable]))))) @@ -113,7 +113,7 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { val pingLatch = new TestLatch val secondPingLatch = new TestLatch - val slaveProps = Props(new Actor { + val employeeProps = Props(new Actor { def receive = { case Ping => @@ -135,16 +135,16 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { } } }) - val slave = Await.result((boss ? slaveProps).mapTo[ActorRef], timeout.duration) + val employee = Await.result((boss ? employeeProps).mapTo[ActorRef], timeout.duration) - slave ! Ping - slave ! Crash + employee ! Ping + employee ! Crash Await.ready(restartLatch, 10 seconds) Await.ready(pingLatch, 10 seconds) - slave ! Ping - slave ! Crash + employee ! Ping + employee ! Crash Await.ready(secondRestartLatch, 10 seconds) Await.ready(secondPingLatch, 10 seconds) @@ -153,15 +153,15 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { sleep(700L) // now crash again... should and post restart ping - slave ! Crash - slave ! Ping + employee ! Crash + employee ! Ping Await.ready(thirdRestartLatch, 1 second) - assert(!slave.isTerminated) + assert(!employee.isTerminated) } - "ensure that slave is not restarted after max retries" in { + "ensure that employee is not restarted after max retries" in { val boss = system.actorOf(Props(new Supervisor(OneForOneStrategy(maxNrOfRetries = 2)(List(classOf[Throwable]))))) val restartLatch = new TestLatch @@ -169,7 +169,7 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { val countDownLatch = new TestLatch(3) val stopLatch = new TestLatch - val slaveProps = Props(new Actor { + val employeeProps = Props(new Actor { def receive = { case Ping => countDownLatch.countDown() @@ -186,33 +186,33 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { stopLatch.open() } }) - val slave = Await.result((boss ? slaveProps).mapTo[ActorRef], timeout.duration) + val employee = Await.result((boss ? employeeProps).mapTo[ActorRef], timeout.duration) - slave ! Ping - slave ! Crash - slave ! Ping + employee ! Ping + employee ! Crash + employee ! Ping // test restart and post restart ping Await.ready(restartLatch, 10 seconds) - assert(!slave.isTerminated) + assert(!employee.isTerminated) // now crash again... should not restart - slave ! Crash - slave ! Ping + employee ! Crash + employee ! Ping Await.ready(secondRestartLatch, 10 seconds) Await.ready(countDownLatch, 10 seconds) sleep(700L) - slave ! Crash + employee ! Crash Await.ready(stopLatch, 10 seconds) sleep(500L) - assert(slave.isTerminated) + assert(employee.isTerminated) } - "ensure that slave is not restarted within time range" in { + "ensure that employee is not restarted within time range" in { val restartLatch, stopLatch, maxNoOfRestartsLatch = new TestLatch val countDownLatch = new TestLatch(2) @@ -224,7 +224,7 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { } })) - val slaveProps = Props(new Actor { + val employeeProps = Props(new Actor { def receive = { case Ping => countDownLatch.countDown() @@ -239,32 +239,32 @@ class RestartStrategySpec extends AkkaSpec with DefaultTimeout { stopLatch.open() } }) - val slave = Await.result((boss ? slaveProps).mapTo[ActorRef], timeout.duration) + val employee = Await.result((boss ? employeeProps).mapTo[ActorRef], timeout.duration) - slave ! Ping - slave ! Crash - slave ! Ping + employee ! Ping + employee ! Crash + employee ! Ping // test restart and post restart ping Await.ready(restartLatch, 10 seconds) - assert(!slave.isTerminated) + assert(!employee.isTerminated) // now crash again... should not restart - slave ! Crash + employee ! Crash // may not be running - slave ! Ping + employee ! Ping Await.ready(countDownLatch, 10 seconds) // may not be running - slave ! Crash + employee ! Crash Await.ready(stopLatch, 10 seconds) Await.ready(maxNoOfRestartsLatch, 10 seconds) sleep(500L) - assert(slave.isTerminated) + assert(employee.isTerminated) } } } diff --git a/akka-actor/src/main/scala/akka/io/Inet.scala b/akka-actor/src/main/scala/akka/io/Inet.scala index 0597ab96fa..ce6654e3f8 100644 --- a/akka-actor/src/main/scala/akka/io/Inet.scala +++ b/akka-actor/src/main/scala/akka/io/Inet.scala @@ -35,8 +35,7 @@ object Inet { def beforeConnect(@unused s: Socket): Unit = () /** - * Action to be taken for this option after connect returned (i.e. on - * the slave socket for servers). + * Action to be taken for this option after connect returned. */ def afterConnect(@unused s: Socket): Unit = () } @@ -50,20 +49,17 @@ object Inet { trait SocketOptionV2 extends SocketOption { /** - * Action to be taken for this option after connect returned (i.e. on - * the slave socket for servers). + * Action to be taken for this option after connect returned. */ def afterBind(@unused s: DatagramSocket): Unit = () /** - * Action to be taken for this option after connect returned (i.e. on - * the slave socket for servers). + * Action to be taken for this option after connect returned. */ def afterBind(@unused s: ServerSocket): Unit = () /** - * Action to be taken for this option after connect returned (i.e. on - * the slave socket for servers). + * Action to be taken for this option after connect returned. */ def afterConnect(@unused s: DatagramSocket): Unit = () diff --git a/akka-docs/src/main/paradox/stream/stream-substream.md b/akka-docs/src/main/paradox/stream/stream-substream.md index 13026497b8..9805d06cce 100644 --- a/akka-docs/src/main/paradox/stream/stream-substream.md +++ b/akka-docs/src/main/paradox/stream/stream-substream.md @@ -54,9 +54,9 @@ Java ![stream-substream-groupBy2.png](../../images/stream-substream-groupBy2.png) Also substreams, more precisely, `SubFlow` and `SubSource` have methods that allow you to -merge or concat substreams into the master stream again. +merge or concat substreams into the main stream again. -The `mergeSubstreams` method merges an unbounded number of substreams back to the master stream. +The `mergeSubstreams` method merges an unbounded number of substreams back to the main stream. Scala : @@snip [SubstreamDocSpec.scala](/akka-docs/src/test/scala/docs/stream/SubstreamDocSpec.scala) { #groupBy3 } diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/LookupRemoteActorSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/LookupRemoteActorSpec.scala index d7e07d85cc..c7a961f917 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/LookupRemoteActorSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/LookupRemoteActorSpec.scala @@ -21,8 +21,8 @@ class LookupRemoteActorMultiJvmSpec(artery: Boolean) extends MultiNodeConfig { akka.remote.artery.enabled = $artery """)).withFallback(RemotingMultiNodeSpec.commonConfig)) - val master = role("master") - val slave = role("slave") + val leader = role("leader") + val follower = role("follower") } @@ -49,19 +49,19 @@ abstract class LookupRemoteActorSpec(multiNodeConfig: LookupRemoteActorMultiJvmS def initialParticipants = 2 - runOn(master) { + runOn(leader) { system.actorOf(Props[SomeActor](), "service-hello") } "Remoting" must { "lookup remote actor" taggedAs LongRunningTest in { - runOn(slave) { + runOn(follower) { val hello = { - system.actorSelection(node(master) / "user" / "service-hello") ! Identify("id1") + system.actorSelection(node(leader) / "user" / "service-hello") ! Identify("id1") expectMsgType[ActorIdentity].ref.get } hello.isInstanceOf[RemoteActorRef] should ===(true) - val masterAddress = testConductor.getAddressFor(master).await + val masterAddress = testConductor.getAddressFor(leader).await (hello ? "identify").await.asInstanceOf[ActorRef].path.address should ===(masterAddress) } enterBarrier("done") diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/NewRemoteActorSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/NewRemoteActorSpec.scala index 0d0595820e..f34a8bb7c1 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/NewRemoteActorSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/NewRemoteActorSpec.scala @@ -24,16 +24,16 @@ class NewRemoteActorMultiJvmSpec(artery: Boolean) extends MultiNodeConfig { akka.remote.use-unsafe-remote-features-outside-cluster = on """).withFallback(RemotingMultiNodeSpec.commonConfig))) - val master = role("master") - val slave = role("slave") + val leader = role("leader") + val follower = role("follower") - deployOn(master, """ - /service-hello.remote = "@slave@" - /service-hello-null.remote = "@slave@" - /service-hello3.remote = "@slave@" + deployOn(leader, """ + /service-hello.remote = "@follower@" + /service-hello-null.remote = "@follower@" + /service-hello3.remote = "@follower@" """) - deployOnAll("""/service-hello2.remote = "@slave@" """) + deployOnAll("""/service-hello2.remote = "@follower@" """) } class NewRemoteActorMultiJvmNode1 extends NewRemoteActorSpec(new NewRemoteActorMultiJvmSpec(artery = false)) @@ -69,14 +69,14 @@ abstract class NewRemoteActorSpec(multiNodeConfig: NewRemoteActorMultiJvmSpec) "A new remote actor" must { "be locally instantiated on a remote node and be able to communicate through its RemoteActorRef" in { - runOn(master) { + runOn(leader) { val actor = system.actorOf(Props[SomeActor](), "service-hello") actor.isInstanceOf[RemoteActorRef] should ===(true) - actor.path.address should ===(node(slave).address) + actor.path.address should ===(node(follower).address) - val slaveAddress = testConductor.getAddressFor(slave).await + val followerAddress = testConductor.getAddressFor(follower).await actor ! "identify" - expectMsgType[ActorRef].path.address should ===(slaveAddress) + expectMsgType[ActorRef].path.address should ===(followerAddress) } enterBarrier("done") @@ -84,14 +84,14 @@ abstract class NewRemoteActorSpec(multiNodeConfig: NewRemoteActorMultiJvmSpec) "be locally instantiated on a remote node (with null parameter) and be able to communicate through its RemoteActorRef" in { - runOn(master) { + runOn(leader) { val actor = system.actorOf(Props(classOf[SomeActorWithParam], null), "service-hello-null") actor.isInstanceOf[RemoteActorRef] should ===(true) - actor.path.address should ===(node(slave).address) + actor.path.address should ===(node(follower).address) - val slaveAddress = testConductor.getAddressFor(slave).await + val followerAddress = testConductor.getAddressFor(follower).await actor ! "identify" - expectMsgType[ActorRef].path.address should ===(slaveAddress) + expectMsgType[ActorRef].path.address should ===(followerAddress) } enterBarrier("done") @@ -99,24 +99,24 @@ abstract class NewRemoteActorSpec(multiNodeConfig: NewRemoteActorMultiJvmSpec) "be locally instantiated on a remote node and be able to communicate through its RemoteActorRef (with deployOnAll)" in { - runOn(master) { + runOn(leader) { val actor = system.actorOf(Props[SomeActor](), "service-hello2") actor.isInstanceOf[RemoteActorRef] should ===(true) - actor.path.address should ===(node(slave).address) + actor.path.address should ===(node(follower).address) - val slaveAddress = testConductor.getAddressFor(slave).await + val followerAddress = testConductor.getAddressFor(follower).await actor ! "identify" - expectMsgType[ActorRef].path.address should ===(slaveAddress) + expectMsgType[ActorRef].path.address should ===(followerAddress) } enterBarrier("done") } "be able to shutdown system when using remote deployed actor" in within(20 seconds) { - runOn(master) { + runOn(leader) { val actor = system.actorOf(Props[SomeActor](), "service-hello3") actor.isInstanceOf[RemoteActorRef] should ===(true) - actor.path.address should ===(node(slave).address) + actor.path.address should ===(node(follower).address) // This watch is in race with the shutdown of the watched system. This race should remain, as the test should // handle both cases: // - remote system receives watch, replies with DeathWatchNotification @@ -126,12 +126,12 @@ abstract class NewRemoteActorSpec(multiNodeConfig: NewRemoteActorMultiJvmSpec) enterBarrier("deployed") - // master system is supposed to be shutdown after slave - // this should be triggered by slave system.terminate + // master system is supposed to be shutdown after follower + // this should be triggered by follower system.terminate expectMsgPF() { case Terminated(`actor`) => true } } - runOn(slave) { + runOn(follower) { enterBarrier("deployed") } diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/testconductor/TestConductorSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/testconductor/TestConductorSpec.scala index bd3ae7abcc..c8c1cb94f0 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/testconductor/TestConductorSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/testconductor/TestConductorSpec.scala @@ -20,8 +20,8 @@ object TestConductorMultiJvmSpec extends MultiNodeConfig { akka.remote.artery.enabled = false """)).withFallback(RemotingMultiNodeSpec.commonConfig)) - val master = role("master") - val slave = role("slave") + val leader = role("leader") + val follower = role("follower") testTransport(on = true) } @@ -36,14 +36,14 @@ class TestConductorSpec extends RemotingMultiNodeSpec(TestConductorMultiJvmSpec) def initialParticipants = 2 lazy val echo = { - system.actorSelection(node(master) / "user" / "echo") ! Identify(None) + system.actorSelection(node(leader) / "user" / "echo") ! Identify(None) expectMsgType[ActorIdentity].ref.get } "A TestConductor" must { "enter a barrier" taggedAs LongRunningTest in { - runOn(master) { + runOn(leader) { system.actorOf(Props(new Actor { def receive = { case x => testActor ! x; sender() ! x @@ -56,20 +56,20 @@ class TestConductorSpec extends RemotingMultiNodeSpec(TestConductorMultiJvmSpec) "support throttling of network connections" taggedAs LongRunningTest in { - runOn(slave) { + runOn(follower) { // start remote network connection so that it can be throttled echo ! "start" } expectMsg("start") - runOn(master) { - testConductor.throttle(slave, master, Direction.Send, rateMBit = 0.01).await + runOn(leader) { + testConductor.throttle(follower, leader, Direction.Send, rateMBit = 0.01).await } enterBarrier("throttled_send") - runOn(slave) { + runOn(follower) { for (i <- 0 to 9) echo ! i } @@ -80,19 +80,19 @@ class TestConductorSpec extends RemotingMultiNodeSpec(TestConductorMultiJvmSpec) enterBarrier("throttled_send2") - runOn(master) { - testConductor.throttle(slave, master, Direction.Send, -1).await - testConductor.throttle(slave, master, Direction.Receive, rateMBit = 0.01).await + runOn(leader) { + testConductor.throttle(follower, leader, Direction.Send, -1).await + testConductor.throttle(follower, leader, Direction.Receive, rateMBit = 0.01).await } enterBarrier("throttled_recv") - runOn(slave) { + runOn(follower) { for (i <- 10 to 19) echo ! i } val (min, max) = - if (isNode(master)) (0 seconds, 500 millis) + if (isNode(leader)) (0 seconds, 500 millis) else (0.3 seconds, 3 seconds) within(min, max) { @@ -102,8 +102,8 @@ class TestConductorSpec extends RemotingMultiNodeSpec(TestConductorMultiJvmSpec) enterBarrier("throttled_recv2") - runOn(master) { - testConductor.throttle(slave, master, Direction.Receive, -1).await + runOn(leader) { + testConductor.throttle(follower, leader, Direction.Receive, -1).await } enterBarrier("after")