首页 > 其他 > 详细

akka note

时间:2015-02-25 18:21:31      阅读:241      评论:0      收藏:0      [点我收藏+]
  • if invoked from an instance that is not an Actor the sender will be deadLetters actor reference by default.
  • 在akka中使用ask模式可设置超时时间,因为ask模式需等待对方的回应
implicit val timeout = Timeout(2 seconds)
(userAggregateManager ? GetUser(user)).map( _ match {
          case u: User if pass.isBcrypted(u.pass) => Some(u)
          case _ => None
})

 

akka note

原文:http://www.cnblogs.com/jHenry/p/4278387.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!