class HotSwapActor extends Actor { |
become是对消息处理集合的动态切换.
当actor restart的时候 状态恢复初始状态
val swap = system.actorOf(Props[HotSwapActor], "swap") |
default |
unbecome就不介绍了,感觉一般用不上.还容易搞出内存泄漏
class HotSwapActor extends Actor { |
become是对消息处理集合的动态切换.
当actor restart的时候 状态恢复初始状态
val swap = system.actorOf(Props[HotSwapActor], "swap") |
default |
unbecome就不介绍了,感觉一般用不上.还容易搞出内存泄漏