diff --git a/akka-actor/src/main/resources/reference.conf b/akka-actor/src/main/resources/reference.conf index 6fe23e8bc4..7d74a2f9cd 100644 --- a/akka-actor/src/main/resources/reference.conf +++ b/akka-actor/src/main/resources/reference.conf @@ -319,20 +319,25 @@ akka { # an instance of that actor its mailbox type will be decided by looking # up a mailbox configuration via T in this mapping requirements { - "akka.dispatch.UnboundedMessageQueueSemantics" = akka.actor.mailbox.unbounded-queue-based - "akka.dispatch.DequeBasedMessageQueue" = akka.actor.mailbox.unbounded-deque-based - "akka.dispatch.UnboundedDequeBasedMessageQueueSemantics" = akka.actor.mailbox.unbounded-deque-based + "akka.dispatch.UnboundedMessageQueueSemantics" = + akka.actor.mailbox.unbounded-queue-based + "akka.dispatch.DequeBasedMessageQueue" = + akka.actor.mailbox.unbounded-deque-based + "akka.dispatch.UnboundedDequeBasedMessageQueueSemantics" = + akka.actor.mailbox.unbounded-deque-based } unbounded-queue-based { - # FQCN of the MailboxType, The Class of the FQCN must have a public constructor - # with (akka.actor.ActorSystem.Settings, com.typesafe.config.Config) parameters. + # FQCN of the MailboxType, The Class of the FQCN must have a public + # constructor with (akka.actor.ActorSystem.Settings, + # com.typesafe.config.Config) parameters. mailbox-type = "akka.dispatch.UnboundedMailbox" } unbounded-deque-based { - # FQCN of the MailboxType, The Class of the FQCN must have a public constructor - # with (akka.actor.ActorSystem.Settings, com.typesafe.config.Config) parameters. + # FQCN of the MailboxType, The Class of the FQCN must have a public + # constructor with (akka.actor.ActorSystem.Settings, + # com.typesafe.config.Config) parameters. mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox" } } @@ -504,11 +509,12 @@ akka { # on which file IO tasks are scheduled file-io-dispatcher = "akka.actor.default-dispatcher" - # The maximum number of bytes (or "unlimited") to transfer in one batch when using - # `WriteFile` command which uses `FileChannel.transferTo` to pipe files to a TCP socket. - # On some OS like Linux `FileChannel.transferTo` may block for a long time when network - # IO is faster than file IO. Decreasing the value may improve fairness while increasing - # may improve throughput. + # The maximum number of bytes (or "unlimited") to transfer in one batch + # when using `WriteFile` command which uses `FileChannel.transferTo` to + # pipe files to a TCP socket. On some OS like Linux `FileChannel.transferTo` + # may block for a long time when network IO is faster than file IO. + # Decreasing the value may improve fairness while increasing may improve + # throughput. file-io-transferTo-limit = 512 KiB } diff --git a/akka-cluster/src/main/resources/reference.conf b/akka-cluster/src/main/resources/reference.conf index 5c0276ca8b..8557dbf6cc 100644 --- a/akka-cluster/src/main/resources/reference.conf +++ b/akka-cluster/src/main/resources/reference.conf @@ -35,10 +35,10 @@ akka { roles = [] role { - # Minimum required number of members of a certain role before the leader changes - # member status of 'Joining' members to 'Up'. Typically used together with - # 'Cluster.registerOnMemberUp' to defer some action, such as starting actors, - # until the cluster has reached a certain size. + # Minimum required number of members of a certain role before the leader + # changes member status of 'Joining' members to 'Up'. Typically used together + # with 'Cluster.registerOnMemberUp' to defer some action, such as starting + # actors, until the cluster has reached a certain size. # E.g. to require 2 nodes with role 'frontend' and 3 nodes with role 'backend': # frontend.min-nr-of-members = 2 # backend.min-nr-of-members = 3 @@ -87,7 +87,8 @@ akka { gossip-different-view-probability = 0.8 # Settings for the Phi accrual failure detector (http://ddg.jaist.ac.jp/pub/HDY+04.pdf - # [Hayashibara et al]) used by the cluster subsystem to detect unreachable members. + # [Hayashibara et al]) used by the cluster subsystem to detect unreachable + # members. failure-detector { # FQCN of the failure detector implementation. @@ -168,10 +169,10 @@ akka { # How quickly the exponential weighting of past data is decayed compared to # new data. Set lower to increase the bias toward newer values. - # The relevance of each data sample is halved for every passing half-life duration, - # i.e. after 4 times the half-life, a data sample’s relevance is reduced to 6% of - # its original relevance. The initial relevance of a data sample is given by - # 1 – 0.5 ^ (collect-interval / half-life). + # The relevance of each data sample is halved for every passing half-life + # duration, i.e. after 4 times the half-life, a data sample’s relevance is + # reduced to 6% of its original relevance. The initial relevance of a data + # sample is given by 1 – 0.5 ^ (collect-interval / half-life). # See http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average moving-average-half-life = 12s } diff --git a/akka-contrib/src/multi-jvm/scala/akka/contrib/pattern/ClusterSingletonManagerSpec.scala b/akka-contrib/src/multi-jvm/scala/akka/contrib/pattern/ClusterSingletonManagerSpec.scala index 3199ed3d8f..6d7daa7c0c 100644 --- a/akka-contrib/src/multi-jvm/scala/akka/contrib/pattern/ClusterSingletonManagerSpec.scala +++ b/akka-contrib/src/multi-jvm/scala/akka/contrib/pattern/ClusterSingletonManagerSpec.scala @@ -148,6 +148,7 @@ object ClusterSingletonManagerSpec extends MultiNodeConfig { // documentation of how to keep track of the oldest member in user land //#singleton-proxy class ConsumerProxy extends Actor { + // subscribe to MemberEvent, re-subscribe when restart override def preStart(): Unit = Cluster(context.system).subscribe(self, classOf[MemberEvent]) @@ -157,7 +158,8 @@ object ClusterSingletonManagerSpec extends MultiNodeConfig { val role = "worker" // sort by age, oldest first val ageOrdering = Ordering.fromLessThan[Member] { (a, b) ⇒ a.isOlderThan(b) } - var membersByAge: immutable.SortedSet[Member] = immutable.SortedSet.empty(ageOrdering) + var membersByAge: immutable.SortedSet[Member] = + immutable.SortedSet.empty(ageOrdering) def receive = { case state: CurrentClusterState ⇒ @@ -170,8 +172,8 @@ object ClusterSingletonManagerSpec extends MultiNodeConfig { } def consumer: Option[ActorSelection] = - membersByAge.headOption map (m ⇒ context.actorSelection(RootActorPath(m.address) / - "user" / "singleton" / "consumer")) + membersByAge.headOption map (m ⇒ context.actorSelection( + RootActorPath(m.address) / "user" / "singleton" / "consumer")) } //#singleton-proxy diff --git a/akka-contrib/src/test/java/akka/contrib/pattern/DistributedPubSubMediatorTest.java b/akka-contrib/src/test/java/akka/contrib/pattern/DistributedPubSubMediatorTest.java index aa804df969..8862133154 100644 --- a/akka-contrib/src/test/java/akka/contrib/pattern/DistributedPubSubMediatorTest.java +++ b/akka-contrib/src/test/java/akka/contrib/pattern/DistributedPubSubMediatorTest.java @@ -46,9 +46,11 @@ public class DistributedPubSubMediatorTest { LoggingAdapter log = Logging.getLogger(getContext().system(), this); public Subscriber() { - ActorRef mediator = DistributedPubSubExtension.get(getContext().system()).mediator(); + ActorRef mediator = + DistributedPubSubExtension.get(getContext().system()).mediator(); // subscribe to the topic named "content" - mediator.tell(new DistributedPubSubMediator.Subscribe("content", getSelf()), getSelf()); + mediator.tell(new DistributedPubSubMediator.Subscribe("content", getSelf()), + getSelf()); } public void onReceive(Object msg) { @@ -67,13 +69,15 @@ public class DistributedPubSubMediatorTest { public class Publisher extends UntypedActor { // activate the extension - ActorRef mediator = DistributedPubSubExtension.get(getContext().system()).mediator(); + ActorRef mediator = + DistributedPubSubExtension.get(getContext().system()).mediator(); public void onReceive(Object msg) { if (msg instanceof String) { String in = (String) msg; String out = in.toUpperCase(); - mediator.tell(new DistributedPubSubMediator.Publish("content", out), getSelf()); + mediator.tell(new DistributedPubSubMediator.Publish("content", out), + getSelf()); } else { unhandled(msg); } diff --git a/akka-contrib/src/test/java/akka/contrib/pattern/ReliableProxyTest.java b/akka-contrib/src/test/java/akka/contrib/pattern/ReliableProxyTest.java index c27e97a724..496855680e 100644 --- a/akka-contrib/src/test/java/akka/contrib/pattern/ReliableProxyTest.java +++ b/akka-contrib/src/test/java/akka/contrib/pattern/ReliableProxyTest.java @@ -68,7 +68,8 @@ public class ReliableProxyTest { return new UntypedActor() { //#demo-transition - final ActorRef proxy = getContext().actorOf(Props.create(ReliableProxy.class, target, Duration.create(100, "millis"))); + final ActorRef proxy = getContext().actorOf(Props.create(ReliableProxy.class, target, + Duration.create(100, "millis"))); ActorRef client = null; { proxy.tell(new FSM.SubscribeTransitionCallBack(getSelf()), getSelf()); diff --git a/akka-docs/rst/java/code/docs/actor/UntypedActorDocTest.java b/akka-docs/rst/java/code/docs/actor/UntypedActorDocTest.java index 966be3850a..bbc357897b 100644 --- a/akka-docs/rst/java/code/docs/actor/UntypedActorDocTest.java +++ b/akka-docs/rst/java/code/docs/actor/UntypedActorDocTest.java @@ -161,7 +161,8 @@ public class UntypedActorDocTest { //#system-actorOf // ActorSystem is a heavy object: create only one per application final ActorSystem system = ActorSystem.create("MySystem"); - final ActorRef myActor = system.actorOf(Props.create(MyUntypedActor.class), "myactor"); + final ActorRef myActor = system.actorOf(Props.create(MyUntypedActor.class), + "myactor"); //#system-actorOf try { new JavaTestKit(system) { @@ -238,7 +239,8 @@ public class UntypedActorDocTest { //#creating-indirectly final ActorRef myActor = getContext().actorOf( - Props.create(DependencyInjector.class, applicationContext, "MyActor"), "myactor3"); + Props.create(DependencyInjector.class, applicationContext, "MyActor"), + "myactor3"); //#creating-indirectly new JavaTestKit(system) { { diff --git a/akka-docs/rst/java/code/docs/actor/mailbox/MyDurableMessageQueue.java b/akka-docs/rst/java/code/docs/actor/mailbox/MyDurableMessageQueue.java index 0e878573f0..934b70af20 100644 --- a/akka-docs/rst/java/code/docs/actor/mailbox/MyDurableMessageQueue.java +++ b/akka-docs/rst/java/code/docs/actor/mailbox/MyDurableMessageQueue.java @@ -23,8 +23,8 @@ public class MyDurableMessageQueue extends DurableMessageQueueWithSerialization private final QueueStorage storage = new QueueStorage(); // A real-world implementation would use configuration to set the last // three parameters below - private final CircuitBreaker breaker = CircuitBreaker.create(system().scheduler(), 5, - Duration.create(30, "seconds"), Duration.create(1, "minute")); + private final CircuitBreaker breaker = CircuitBreaker.create(system().scheduler(), + 5, Duration.create(30, "seconds"), Duration.create(1, "minute")); @Override public void enqueue(ActorRef receiver, final Envelope envelope) { diff --git a/akka-docs/rst/java/code/docs/future/FutureDocTest.java b/akka-docs/rst/java/code/docs/future/FutureDocTest.java index c37edebbe5..6b27374e7f 100644 --- a/akka-docs/rst/java/code/docs/future/FutureDocTest.java +++ b/akka-docs/rst/java/code/docs/future/FutureDocTest.java @@ -566,7 +566,8 @@ public class FutureDocTest { return "foo"; } }, ec); - Future result = Futures.firstCompletedOf(Arrays.>asList(future, delayed), ec); + Future result = Futures.firstCompletedOf( + Arrays.>asList(future, delayed), ec); //#after Await.result(result, Duration.create(2, SECONDS)); } diff --git a/akka-docs/rst/java/code/docs/io/japi/Processor.java b/akka-docs/rst/java/code/docs/io/japi/Processor.java index ee0b704121..fb0c3f3750 100644 --- a/akka-docs/rst/java/code/docs/io/japi/Processor.java +++ b/akka-docs/rst/java/code/docs/io/japi/Processor.java @@ -43,7 +43,8 @@ public class Processor extends UntypedActor { final PipelineStage stages = PipelineStage.sequence( // Java 7 can infer these types, Java 6 cannot - PipelineStage. sequence( // + PipelineStage. sequence( // new TickGenerator(interval), // new MessageStage()), // new LengthFieldFrame(10000)); diff --git a/akka-docs/rst/java/code/docs/io/japi/SslDocTest.java b/akka-docs/rst/java/code/docs/io/japi/SslDocTest.java index e1d75faa87..5d0bf86626 100644 --- a/akka-docs/rst/java/code/docs/io/japi/SslDocTest.java +++ b/akka-docs/rst/java/code/docs/io/japi/SslDocTest.java @@ -57,7 +57,8 @@ public class SslDocTest { final LoggingAdapter log = Logging .getLogger(getContext().system(), getSelf()); - public SslClient(InetSocketAddress remote, SSLContext sslContext, ActorRef listener) { + public SslClient(InetSocketAddress remote, SSLContext sslContext, + ActorRef listener) { this.remote = remote; this.sslContext = sslContext; this.listener = listener; diff --git a/akka-docs/rst/java/code/docs/jrouting/CustomRouterDocTest.java b/akka-docs/rst/java/code/docs/jrouting/CustomRouterDocTest.java index e3b4632913..acfcdde8f4 100644 --- a/akka-docs/rst/java/code/docs/jrouting/CustomRouterDocTest.java +++ b/akka-docs/rst/java/code/docs/jrouting/CustomRouterDocTest.java @@ -176,14 +176,17 @@ public class CustomRouterDocTest { //#crRoutingLogic return new CustomRoute() { @Override - public scala.collection.immutable.Seq destinationsFor(ActorRef sender, Object msg) { + public scala.collection.immutable.Seq destinationsFor( + ActorRef sender, Object msg) { switch ((Message) msg) { case DemocratVote: case DemocratCountResult: - return akka.japi.Util.immutableSingletonSeq(new Destination(sender, democratActor)); + return akka.japi.Util.immutableSingletonSeq( + new Destination(sender, democratActor)); case RepublicanVote: case RepublicanCountResult: - return akka.japi.Util.immutableSingletonSeq(new Destination(sender, republicanActor)); + return akka.japi.Util.immutableSingletonSeq( + new Destination(sender, republicanActor)); default: throw new IllegalArgumentException("Unknown message: " + msg); } diff --git a/akka-docs/rst/java/code/docs/serialization/SerializationDocTest.java b/akka-docs/rst/java/code/docs/serialization/SerializationDocTest.java index 408f627c27..6b4c8ad39c 100644 --- a/akka-docs/rst/java/code/docs/serialization/SerializationDocTest.java +++ b/akka-docs/rst/java/code/docs/serialization/SerializationDocTest.java @@ -64,7 +64,8 @@ public class SerializationDocTest { // Deserialize // (beneath fromBinary) - final ActorRef deserializedActorRef = extendedSystem.provider().resolveActorRef(identifier); + final ActorRef deserializedActorRef = extendedSystem.provider().resolveActorRef( + identifier); // Then just use the ActorRef //#actorref-serializer JavaTestKit.shutdownActorSystem(extendedSystem); diff --git a/akka-docs/rst/java/code/docs/zeromq/ZeromqDocTest.java b/akka-docs/rst/java/code/docs/zeromq/ZeromqDocTest.java index db3c355c18..c73e77e0ed 100644 --- a/akka-docs/rst/java/code/docs/zeromq/ZeromqDocTest.java +++ b/akka-docs/rst/java/code/docs/zeromq/ZeromqDocTest.java @@ -88,7 +88,8 @@ public class ZeromqDocTest { byte[] payload = new byte[0]; //#pub-topic - pubSocket.tell(ZMQMessage.withFrames(ByteString.fromString("foo.bar"), ByteString.fromArray(payload)), null); + pubSocket.tell(ZMQMessage.withFrames(ByteString.fromString("foo.bar"), + ByteString.fromArray(payload)), null); //#pub-topic system.stop(subSocket); diff --git a/akka-docs/rst/project/migration-guide-2.1.x-2.2.x.rst b/akka-docs/rst/project/migration-guide-2.1.x-2.2.x.rst index 21fe84d0ac..fe73e89f1d 100644 --- a/akka-docs/rst/project/migration-guide-2.1.x-2.2.x.rst +++ b/akka-docs/rst/project/migration-guide-2.1.x-2.2.x.rst @@ -299,7 +299,8 @@ The following will not match:: Instead, use actorSelection followed by identify request, and watch the verified actor reference:: - val selection = context.actorSelection("akka.tcp://actorSystemName@10.0.0.1:2552/user/actorName") + val selection = context.actorSelection( + "akka.tcp://actorSystemName@10.0.0.1:2552/user/actorName") selection ! Identify(None) var ref: ActorRef = _ diff --git a/akka-docs/rst/scala/code/docs/actor/TypedActorDocSpec.scala b/akka-docs/rst/scala/code/docs/actor/TypedActorDocSpec.scala index f97d754051..8b602d8c93 100644 --- a/akka-docs/rst/scala/code/docs/actor/TypedActorDocSpec.scala +++ b/akka-docs/rst/scala/code/docs/actor/TypedActorDocSpec.scala @@ -11,7 +11,8 @@ import org.scalatest.{ BeforeAndAfterAll, WordSpec } import org.scalatest.matchers.MustMatchers import akka.testkit._ //#typed-actor-impl -import java.lang.String.{ valueOf ⇒ println } //Mr funny man avoids printing to stdout AND keeping docs alright +//Mr funny man avoids printing to stdout AND keeping docs alright +import java.lang.String.{ valueOf ⇒ println } import akka.actor.ActorRef //#typed-actor-iface diff --git a/akka-docs/rst/scala/code/docs/dispatcher/DispatcherDocSpec.scala b/akka-docs/rst/scala/code/docs/dispatcher/DispatcherDocSpec.scala index 6cfbd1e2a3..3cbaefcacd 100644 --- a/akka-docs/rst/scala/code/docs/dispatcher/DispatcherDocSpec.scala +++ b/akka-docs/rst/scala/code/docs/dispatcher/DispatcherDocSpec.scala @@ -191,7 +191,8 @@ object DispatcherDocSpec { import akka.dispatch.RequiresMessageQueue import akka.dispatch.BoundedMessageQueueSemantics - class MyBoundedActor extends MyActor with RequiresMessageQueue[BoundedMessageQueueSemantics] + class MyBoundedActor extends MyActor + with RequiresMessageQueue[BoundedMessageQueueSemantics] //#required-mailbox-class //#mailbox-implementation-example @@ -301,7 +302,8 @@ class DispatcherDocSpec extends AkkaSpec(DispatcherDocSpec.config) { case x ⇒ log.info(x.toString) } } - val a = system.actorOf(Props(classOf[Logger], this).withDispatcher("prio-dispatcher")) + val a = system.actorOf(Props(classOf[Logger], this).withDispatcher( + "prio-dispatcher")) /* * Logs: diff --git a/akka-docs/rst/scala/code/docs/serialization/SerializationDocSpec.scala b/akka-docs/rst/scala/code/docs/serialization/SerializationDocSpec.scala index 74ae1cf4d0..006ab20c92 100644 --- a/akka-docs/rst/scala/code/docs/serialization/SerializationDocSpec.scala +++ b/akka-docs/rst/scala/code/docs/serialization/SerializationDocSpec.scala @@ -182,7 +182,8 @@ package docs.serialization { } def serializeTo(ref: ActorRef, remote: Address): String = - ref.path.toSerializationFormatWithAddress(ExternalAddress(extendedSystem).addressFor(remote)) + ref.path.toSerializationFormatWithAddress(ExternalAddress(extendedSystem). + addressFor(remote)) //#external-address } @@ -197,7 +198,8 @@ package docs.serialization { } def serializeAkkaDefault(ref: ActorRef): String = - ref.path.toSerializationFormatWithAddress(ExternalAddress(theActorSystem).addressForAkka) + ref.path.toSerializationFormatWithAddress(ExternalAddress(theActorSystem). + addressForAkka) //#external-address-default } } diff --git a/akka-docs/rst/scala/code/docs/testkit/TestKitUsageSpec.scala b/akka-docs/rst/scala/code/docs/testkit/TestKitUsageSpec.scala index 3775b49636..ef4f49868c 100644 --- a/akka-docs/rst/scala/code/docs/testkit/TestKitUsageSpec.scala +++ b/akka-docs/rst/scala/code/docs/testkit/TestKitUsageSpec.scala @@ -146,8 +146,8 @@ object TestKitUsageSpec { * like to test that the interesting value is received and that you cant * be bothered with the rest */ - class SequencingActor(next: ActorRef, head: immutable.Seq[String], tail: immutable.Seq[String]) - extends Actor { + class SequencingActor(next: ActorRef, head: immutable.Seq[String], + tail: immutable.Seq[String]) extends Actor { def receive = { case msg ⇒ { head foreach { next ! _ } diff --git a/akka-docs/rst/scala/code/docs/zeromq/ZeromqDocSpec.scala b/akka-docs/rst/scala/code/docs/zeromq/ZeromqDocSpec.scala index 005898e763..0d4abd241e 100644 --- a/akka-docs/rst/scala/code/docs/zeromq/ZeromqDocSpec.scala +++ b/akka-docs/rst/scala/code/docs/zeromq/ZeromqDocSpec.scala @@ -99,7 +99,8 @@ object ZeromqDocSpec { def receive = { // the first frame is the topic, second is the message case m: ZMQMessage if m.frames(0).utf8String == "health.heap" ⇒ - val Heap(timestamp, used, max) = ser.deserialize(m.frames(1).toArray, classOf[Heap]).get + val Heap(timestamp, used, max) = + ser.deserialize(m.frames(1).toArray, classOf[Heap]).get if ((used.toDouble / max) > 0.9) count += 1 else count = 0 if (count > 10) log.warning("Need more memory, using {} %", diff --git a/akka-remote/src/main/resources/reference.conf b/akka-remote/src/main/resources/reference.conf index c2228c8823..03f7b268e5 100644 --- a/akka-remote/src/main/resources/reference.conf +++ b/akka-remote/src/main/resources/reference.conf @@ -84,8 +84,8 @@ akka { mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox" } - # Controls the backoff interval after a refused write is reattempted. (Transports may - # refuse writes if their internal buffer is full) + # Controls the backoff interval after a refused write is reattempted. + # (Transports may refuse writes if their internal buffer is full) backoff-interval = 0.01 s # Acknowledgment timeout of management commands sent to the transport stack. @@ -135,7 +135,8 @@ akka { ### Failure detection and recovery # Settings for the Phi accrual failure detector (http://ddg.jaist.ac.jp/pub/HDY+04.pdf - # [Hayashibara et al]) used by the remoting subsystem to detect failed connections. + # [Hayashibara et al]) used by the remoting subsystem to detect failed + # connections. transport-failure-detector { # FQCN of the failure detector implementation. @@ -359,13 +360,13 @@ akka { # Sets the size of the connection backlog backlog = 4096 - + # Enables the TCP_NODELAY flag, i.e. disables Nagle’s algorithm tcp-nodelay = on - + # Enables TCP Keepalive, subject to the O/S kernel’s configuration tcp-keepalive = on - + # Enables SO_REUSEADDR, which determines when an ActorSystem can open # the specified listen port (the meaning differs between *nix and Windows) tcp-reuse-addr = on diff --git a/akka-samples/akka-sample-cluster/src/main/java/sample/cluster/factorial/japi/FactorialFrontendMain.java b/akka-samples/akka-sample-cluster/src/main/java/sample/cluster/factorial/japi/FactorialFrontendMain.java index 3cd6271aa7..216c58bf10 100644 --- a/akka-samples/akka-sample-cluster/src/main/java/sample/cluster/factorial/japi/FactorialFrontendMain.java +++ b/akka-samples/akka-sample-cluster/src/main/java/sample/cluster/factorial/japi/FactorialFrontendMain.java @@ -20,7 +20,8 @@ public class FactorialFrontendMain { Cluster.get(system).registerOnMemberUp(new Runnable() { @Override public void run() { - system.actorOf(Props.create(FactorialFrontend.class, upToN, true), "factorialFrontend"); + system.actorOf(Props.create(FactorialFrontend.class, upToN, true), + "factorialFrontend"); } }); //#registerOnUp diff --git a/akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSingleMasterSpec.scala b/akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSingleMasterSpec.scala index 882805a80a..bbafe0f7ad 100644 --- a/akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSingleMasterSpec.scala +++ b/akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSingleMasterSpec.scala @@ -100,7 +100,8 @@ abstract class StatsSampleSingleMasterSpec extends MultiNodeSpec(StatsSampleSing // service and worker nodes might not be up yet awaitAssert { facade ! StatsJob("this is the text that will be analyzed") - expectMsgType[StatsResult](1.second).meanWordLength must be(3.875 plusOrMinus 0.001) + expectMsgType[StatsResult](1.second).meanWordLength must be( + 3.875 plusOrMinus 0.001) } testConductor.enter("done") diff --git a/akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSpec.scala b/akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSpec.scala index f3f3fee728..1e7a7e5429 100644 --- a/akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSpec.scala +++ b/akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSpec.scala @@ -120,7 +120,8 @@ abstract class StatsSampleSpec extends MultiNodeSpec(StatsSampleSpecConfig) // first attempts might fail because worker actors not started yet awaitAssert { service ! StatsJob("this is the text that will be analyzed") - expectMsgType[StatsResult](1.second).meanWordLength must be(3.875 plusOrMinus 0.001) + expectMsgType[StatsResult](1.second).meanWordLength must be( + 3.875 plusOrMinus 0.001) } } diff --git a/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCreationApplication.java b/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCreationApplication.java index 3aa9c2e8f0..8a46b25410 100644 --- a/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCreationApplication.java +++ b/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCreationApplication.java @@ -18,9 +18,10 @@ public class JCreationApplication implements Bootable { public JCreationApplication() { system = ActorSystem.create("CreationApplication", ConfigFactory.load() .getConfig("remotecreation")); - final ActorRef remoteActor = system.actorOf(Props.create(JAdvancedCalculatorActor.class), - "advancedCalculator"); - actor = system.actorOf(Props.create(JCreationActor.class, remoteActor), "creationActor"); + final ActorRef remoteActor = system.actorOf(Props.create( + JAdvancedCalculatorActor.class), "advancedCalculator"); + actor = system.actorOf(Props.create(JCreationActor.class, remoteActor), + "creationActor"); } diff --git a/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupActor.java b/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupActor.java index f02dcbd68a..f77607a1c3 100644 --- a/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupActor.java +++ b/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupActor.java @@ -42,11 +42,13 @@ public class JLookupActor extends UntypedActor { } else if (message instanceof Op.AddResult) { Op.AddResult result = (Op.AddResult) message; - System.out.printf("Add result: %d + %d = %d\n", result.getN1(), result.getN2(), result.getResult()); + System.out.printf("Add result: %d + %d = %d\n", result.getN1(), + result.getN2(), result.getResult()); } else if (message instanceof Op.SubtractResult) { Op.SubtractResult result = (Op.SubtractResult) message; - System.out.printf("Sub result: %d - %d = %d\n", result.getN1(), result.getN2(), result.getResult()); + System.out.printf("Sub result: %d - %d = %d\n", result.getN1(), + result.getN2(), result.getResult()); } else { unhandled(message); diff --git a/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java b/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java index 4373bcfa0a..c1398a1469 100644 --- a/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java +++ b/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java @@ -18,8 +18,10 @@ public class JLookupApplication implements Bootable { private ActorRef actor; public JLookupApplication() { - system = ActorSystem.create("LookupApplication", ConfigFactory.load().getConfig("remotelookup")); - final String path = "akka.tcp://CalculatorApplication@127.0.0.1:2552/user/simpleCalculator"; + system = ActorSystem.create("LookupApplication", ConfigFactory.load().getConfig( + "remotelookup")); + final String path = + "akka.tcp://CalculatorApplication@127.0.0.1:2552/user/simpleCalculator"; actor = system.actorOf(Props.create(JLookupActor.class, path), "lookupActor"); } diff --git a/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JSimpleCalculatorActor.java b/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JSimpleCalculatorActor.java index 604a20a00f..c9e42ed697 100644 --- a/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JSimpleCalculatorActor.java +++ b/akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JSimpleCalculatorActor.java @@ -19,7 +19,8 @@ public class JSimpleCalculatorActor extends UntypedActor { } else if (message instanceof Op.Subtract) { Op.Subtract subtract = (Op.Subtract) message; - System.out.println("Calculating " + subtract.getN1() + " - " + subtract.getN2()); + System.out.println("Calculating " + subtract.getN1() + " - " + + subtract.getN2()); getSender().tell(new Op.SubtractResult( subtract.getN1(), subtract.getN2(), subtract.getN1() - subtract.getN2()), getSelf());