Created
August 27, 2014 02:47
-
-
Save xuwei-k/947757c8c5b976fda154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome to Scala version 2.11.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_67). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import akka.actor._ | |
import akka.actor._ | |
scala> val system = ActorSystem("hoge") | |
system: akka.actor.ActorSystem = akka://hoge | |
scala> class PrintActor extends Actor{ def receive = { case msg => println(msg) } } | |
defined class PrintActor | |
scala> val a = system.actorOf(Props[PrintActor],"aaa") | |
a: akka.actor.ActorRef = Actor[akka://hoge/user/aaa#-545562946] | |
scala> import scala.concurrent.duration._ | |
import scala.concurrent.duration._ | |
scala> scala.concurrent.Await.result(system.actorSelection("/user/aaa").resolveOne()(akka.util.Timeout.intToTimeout(1000)), 10.seconds) | |
res0: akka.actor.ActorRef = Actor[akka://hoge/user/aaa#-545562946] | |
scala> scala.concurrent.Await.result(system.actorSelection("/user/aa*").resolveOne()(akka.util.Timeout.intToTimeout(1000)), 10.seconds) | |
res1: akka.actor.ActorRef = Actor[akka://hoge/user/aaa#-545562946] | |
scala> scala.concurrent.Await.result(system.actorSelection("/user/aa").resolveOne()(akka.util.Timeout.intToTimeout(1000)), 10.seconds) | |
akka.actor.ActorNotFound: Actor not found for: ActorSelection[Anchor(akka://hoge/), Path(/user/aa)] | |
at akka.actor.ActorSelection$$anonfun$resolveOne$1.apply(ActorSelection.scala:65) | |
at akka.actor.ActorSelection$$anonfun$resolveOne$1.apply(ActorSelection.scala:63) | |
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) | |
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67) | |
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82) | |
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) | |
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) | |
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) | |
at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58) | |
at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.unbatchedExecute(Future.scala:74) | |
at akka.dispatch.BatchingExecutor$class.execute(BatchingExecutor.scala:110) | |
at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.execute(Future.scala:73) | |
at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40) | |
at scala.concurrent.impl.Promise$DefaultPromise.scala$concurrent$impl$Promise$DefaultPromise$$dispatchOrAddCallback(Promise.scala:280) | |
at scala.concurrent.impl.Promise$DefaultPromise.onComplete(Promise.scala:270) | |
at akka.actor.ActorSelection.resolveOne(ActorSelection.scala:63) | |
... 33 elided | |
scala> scala.concurrent.Await.result(system.actorSelection("/user/bb").resolveOne()(akka.util.Timeout.intToTimeout(1000)), 10.seconds) | |
akka.actor.ActorNotFound: Actor not found for: ActorSelection[Anchor(akka://hoge/), Path(/user/bb)] | |
at akka.actor.ActorSelection$$anonfun$resolveOne$1.apply(ActorSelection.scala:65) | |
at akka.actor.ActorSelection$$anonfun$resolveOne$1.apply(ActorSelection.scala:63) | |
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) | |
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67) | |
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82) | |
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) | |
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) | |
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) | |
at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58) | |
at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.unbatchedExecute(Future.scala:74) | |
at akka.dispatch.BatchingExecutor$class.execute(BatchingExecutor.scala:110) | |
at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.execute(Future.scala:73) | |
at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40) | |
at scala.concurrent.impl.Promise$DefaultPromise.scala$concurrent$impl$Promise$DefaultPromise$$dispatchOrAddCallback(Promise.scala:280) | |
at scala.concurrent.impl.Promise$DefaultPromise.onComplete(Promise.scala:270) | |
at akka.actor.ActorSelection.resolveOne(ActorSelection.scala:63) | |
... 33 elided |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment