reverted back to call-by-name parameter
This commit is contained in:
parent
9be6314484
commit
3da35fb191
2 changed files with 5 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ trait RemoteModule {
|
||||||
val UUID_PREFIX = "uuid:".intern
|
val UUID_PREFIX = "uuid:".intern
|
||||||
|
|
||||||
def optimizeLocalScoped_?(): Boolean //Apply optimizations for remote operations in local scope
|
def optimizeLocalScoped_?(): Boolean //Apply optimizations for remote operations in local scope
|
||||||
protected[akka] def notifyListeners(message: Any): Unit
|
protected[akka] def notifyListeners(message: => Any): Unit
|
||||||
|
|
||||||
private[akka] def actors: ConcurrentHashMap[String, ActorRef]
|
private[akka] def actors: ConcurrentHashMap[String, ActorRef]
|
||||||
private[akka] def actorsByUuid: ConcurrentHashMap[String, ActorRef]
|
private[akka] def actorsByUuid: ConcurrentHashMap[String, ActorRef]
|
||||||
|
|
@ -227,7 +227,7 @@ abstract class RemoteSupport extends ListenerManagement with RemoteServerModule
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override def manageLifeCycleOfListeners = false
|
protected override def manageLifeCycleOfListeners = false
|
||||||
protected[akka] override def notifyListeners(message: Any): Unit = super.notifyListeners(message)
|
protected[akka] override def notifyListeners(message: => Any): Unit = super.notifyListeners(message)
|
||||||
|
|
||||||
private[akka] val actors = new ConcurrentHashMap[String, ActorRef]
|
private[akka] val actors = new ConcurrentHashMap[String, ActorRef]
|
||||||
private[akka] val actorsByUuid = new ConcurrentHashMap[String, ActorRef]
|
private[akka] val actorsByUuid = new ConcurrentHashMap[String, ActorRef]
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,13 @@ trait ListenerManagement {
|
||||||
*/
|
*/
|
||||||
def hasListener(listener: ActorRef): Boolean = listeners.contains(listener)
|
def hasListener(listener: ActorRef): Boolean = listeners.contains(listener)
|
||||||
|
|
||||||
protected[akka] def notifyListeners(message: Any) {
|
protected[akka] def notifyListeners(message: => Any) {
|
||||||
if (hasListeners) {
|
if (hasListeners) {
|
||||||
|
val msg = message
|
||||||
val iterator = listeners.iterator
|
val iterator = listeners.iterator
|
||||||
while (iterator.hasNext) {
|
while (iterator.hasNext) {
|
||||||
val listener = iterator.next
|
val listener = iterator.next
|
||||||
if (listener.isRunning) listener ! message
|
if (listener.isRunning) listener ! msg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue