cleaned up

parent 58e980d0
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
//Comment out to use the remote example
remote {
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
hostname = "127.0.0.1"
port = 1337
}
}
}
\ No newline at end of file
//akka {
//
// actor {
// provider = "akka.remote.RemoteActorRefProvider"
// }
//
// remote {
// enabled-transports = ["akka.remote.netty.tcp"]
// netty.tcp {
// hostname = "127.0.0.1"
// port = 1337
// }
// }
//
//}
\ No newline at end of file
package no.nsd.akkapres
import akka.actor.{ActorSystem, Props}
import no.nsd.akkapres.counter.CounterActor
import no.nsd.akkapres.greeting.GreeterResponseActor
/**
* Where you would start an actual application.
*
* App is a Scala shortcut for main.
* Think of "object" as a Scala keyword for singleton.
*/
object AkkaPres extends App {
implicit val system = ActorSystem("akkapres")
system.actorOf(Props(classOf[GreeterResponseActor]), "greeter")
system.actorOf(Props(classOf[CounterActor]), "counter")
}
......@@ -5,7 +5,7 @@ import scala.annotation.tailrec
import akka.actor.{Actor, ActorLogging, ActorSystem, Props}
object Factorial extends App {
val factorials = List(2000, 1800, 3200, 2800, 2200, 4200, 5500, 4800)
val factorials = List(200000, 180000, 320000, 280000)
val system = ActorSystem("factorial")
val factorialCollector = system.actorOf(Props(new FactorialCollectorActor(factorials)), "factorialCollector")
......
......@@ -2,9 +2,6 @@ package no.nsd.akkapres.remote
import akka.actor.{Actor, ActorLogging}
/**
* @author Dag Østgulen Heradstveit
*/
class RemoteHelloActor extends Actor with ActorLogging {
def receive = {
......@@ -14,4 +11,4 @@ class RemoteHelloActor extends Actor with ActorLogging {
case "PING" =>
log.info("PONG!!!!!")
}
}
}
\ No newline at end of file
......@@ -53,6 +53,10 @@ with ImplicitSender with FlatSpecLike with Matchers with BeforeAndAfterAll {
expectMsgPF() {
case t @ Terminated(`failureActor`) if t.existenceConfirmed => ()
}
// existenceConfirmed is false when the Terminated message was not sent
// directly from the watched actor, but derived from another source, such as
// when watching a non-local ActorRef, which might not have been resolve
}
"Child actor" must "survive failure" in {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment