Making so that if the given address to a LocalActorRef is null or the empty string, it should use the toString of the uuid
This commit is contained in:
parent
54b70b1017
commit
c5ed2a8f21
2 changed files with 7 additions and 2 deletions
|
|
@ -164,7 +164,7 @@ abstract class ActorRef extends ActorRefShared with UntypedChannel with ReplyCha
|
||||||
*/
|
*/
|
||||||
class LocalActorRef private[akka] (
|
class LocalActorRef private[akka] (
|
||||||
private[this] val props: Props,
|
private[this] val props: Props,
|
||||||
val address: String,
|
givenAddress: String,
|
||||||
val systemService: Boolean = false,
|
val systemService: Boolean = false,
|
||||||
override private[akka] val uuid: Uuid = newUuid,
|
override private[akka] val uuid: Uuid = newUuid,
|
||||||
receiveTimeout: Option[Long] = None,
|
receiveTimeout: Option[Long] = None,
|
||||||
|
|
@ -184,6 +184,11 @@ class LocalActorRef private[akka] (
|
||||||
actorCell.setActorContext(actorCell) // this is needed for deserialization - why?
|
actorCell.setActorContext(actorCell) // this is needed for deserialization - why?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final def address: String = givenAddress match {
|
||||||
|
case null | "" ⇒ uuid.toString
|
||||||
|
case other ⇒ other
|
||||||
|
}
|
||||||
|
|
||||||
private[this] val actorCell = new ActorCell(this, props, receiveTimeout, hotswap)
|
private[this] val actorCell = new ActorCell(this, props, receiveTimeout, hotswap)
|
||||||
actorCell.start()
|
actorCell.start()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ object Remote extends RemoteService {
|
||||||
private[remote] lazy val remoteDaemon =
|
private[remote] lazy val remoteDaemon =
|
||||||
new LocalActorRef(
|
new LocalActorRef(
|
||||||
props = Props(new RemoteDaemon).withDispatcher(new PinnedDispatcher()).withSupervisor(remoteDaemonSupervisor),
|
props = Props(new RemoteDaemon).withDispatcher(new PinnedDispatcher()).withSupervisor(remoteDaemonSupervisor),
|
||||||
address = Remote.remoteDaemonServiceName,
|
givenAddress = Remote.remoteDaemonServiceName,
|
||||||
systemService = true)
|
systemService = true)
|
||||||
|
|
||||||
private[remote] lazy val remoteClientLifeCycleHandler = actorOf(Props(new Actor {
|
private[remote] lazy val remoteClientLifeCycleHandler = actorOf(Props(new Actor {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue