Actor
形質がそのようにように定義されている具体的な俳優にヴァルとしてSupervisorstrategyオーバーライドは、Scalaで
/**
* User overridable definition the strategy to use for supervising
* child actors.
*/
def supervisorStrategy: SupervisorStrategy = SupervisorStrategy.defaultStrategy
iは次のように具体的な俳優のすべてのサンプル・コードが定義されていることを確認しかし、
override val supervisorStrategy = OneForOneStrategy(loggingEnabled = false) {
...
}
私が理解しようとしているのは、なぜsupervisorStrategy
がval
として上書きされているのですか?
def
として無効にしてみませんか?
私たちがメソッドが呼び出されるたびにこの評価が欲しくないような記憶上の考慮事項ですか?
[こちら](http://stackoverflow.com/questions/19642053/when-to-use-valor-def-in-scala-traits)をご覧ください。 –