Akka中Typed和UnTyped Actors有什么区别?什么时候用? [英] What is the difference between Typed and UnTyped Actors in Akka? When to use what?

查看:981
本文介绍了Akka中Typed和UnTyped Actors有什么区别?什么时候用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过阅读Akka文档,找出Typed和Untyped actor之间的确切区别。什么时候用?我不确定我错过了什么。有人可以指点我相关的东西或者在这里提供这个问题的答案吗?

I have tried to read the Akka documentation to find out the exact difference between Typed and Untyped actors. When to use what? I am not sure what I'm missing. Can somebody point me to something relevant or provide an answer to this question here itself?

推荐答案

UntypedActor只是Actor的名字但是作为Java API。

UntypedActor is simply the name for Actor but as the Java API.

我很惊讶文档不够用:

Java:

  • http://akka.io/docs/akka/1.2/java/typed-actors.html
  • http://akka.io/docs/akka/1.2/java/untyped-actors.html

Scala:

  • http://akka.io/docs/akka/1.2/scala/typed-actors.html
  • http://akka.io/docs/akka/1.2/scala/actors.html

区别在于TypedActors有一个静态接口,该接口上方法的调用转换为消息发送。 UntypedActors可以接收任何消息。

The difference is that TypedActors have a static interface, and the invocations of the methods on that interface is transformed into message sends. UntypedActors can receive any message.

希望有所帮助。

干杯,$ b $b√

这篇关于Akka中Typed和UnTyped Actors有什么区别?什么时候用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆