通过案例解析Akka中的Actor的定义和创建
学习通过案例解析Akka中的Actor的定义和创建,用ActorSystem指定名称,应用_system实例actorOf方法创建Actor,应用Props指定Actor类型,创建过中直接启动Actor
案例如下:
val _system=ActorSystem("HelloAkka")
val master=_system.actorOf(Props[MasterActor], name="master")
学习通过案例解析Akka中的Actor的定义和创建,用ActorSystem指定名称,应用_system实例actorOf方法创建Actor,应用Props指定Actor类型,创建过中直接启动Actor
案例如下:
val _system=ActorSystem("HelloAkka")
val master=_system.actorOf(Props[MasterActor], name="master")