AkkaActor 引用
发布时间
阅读量:
阅读量
Actor系统的实体
在Actor系统架构中建立了一种层级式的监管模式,在这种模式下actor实例能够跨越多台网络节点实现无缝对接与信息传递

上图清晰地展示了actor在源码层面的不同抽象及其父子关系。
Actor类中的一个成员属性context属于 ActorContext 类型。该属性存储了与 Actor 相关的上下文信息,并包含了 self 和 sender 两个字段。
通过混入 ActorRefFactory 特性和相关接口定义,在 ActorContext 中实现了创建子 actor 的方法。
如图所示的是关于 Actor 类中 context 属性的具体代码实现内容。
trait Actor {
/** * Stores the context for this actor, including self, and sender.
* It is implicit to support operations such as `forward`.
* * WARNING: Only valid within the Actor itself, so do not c
全部评论 (0)
还没有任何评论哟~
