読者です 読者をやめる 読者になる 読者になる

by shigemk2

当面は技術的なことしか書かない

Props

Scala Akka

Props is a configuration object using in creating an Actor; it is immutable, so it is thread-safe and fully shareable.

val props = Props.empty
val props = Props[MyActor]
val props = Props(classOf[MyActor], arg1, arg2)

val otherProps = props.withDispatcher("dispatcher-id")
val otherProps = props.withDeploy(<deployment info>)

Props

applyを見ると、こう。

public static Props apply(java.lang.Class<?> clazz,
                          scala.collection.Seq<java.lang.Object> args)
Scala API: create a Props given a class and its constructor arguments.