incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esjew...@apache.org
Subject svn commit: r902610 - in /incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor: Distributor.scala UserActor.scala
Date Sun, 24 Jan 2010 17:42:57 GMT
Author: esjewett
Date: Sun Jan 24 17:42:56 2010
New Revision: 902610

URL: http://svn.apache.org/viewvc?rev=902610&view=rev
Log:
Removing dead code from the actor model Distributor.StartMeUp and UserActor.RunFunc, and fixing
a typo in a comment.

Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala?rev=902610&r1=902609&r2=902610&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala Sun
Jan 24 17:42:56 2010
@@ -40,15 +40,12 @@
 import scala.xml.{Elem}
 
 /**
- * The Distributor actor forwards messages to the approprite user actor
+ * The Distributor actor forwards messages to the appropriate user actor
  * without the need for the sender to have a reference to it.
  * If the actor is not started, Distributor starts it up in findOrCreateUser
  */
 object Distributor extends LiftActor {
   protected def messageHandler = {
-      case StartMeUp =>
-        User.findAll.map(_.id.is).foreach(findOrCreateUser)
-
       case UserCreatedMessage(user, text, tags, when, 
                               metaData,
                               source,
@@ -99,9 +96,7 @@
         findOrCreateUser(userId) ! UserActor.Resend(msgId)
 
       case _ =>
-  }
-
-  private case object StartMeUp
+  }                             
 
   case class UserCreatedMessage(user: Long, text: String, tags: List[String],
                                 when: Long,

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala?rev=902610&r1=902609&r2=902610&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala Sun Jan
24 17:42:56 2010
@@ -85,9 +85,7 @@
 
   private def followers: List[Long] = User.followerIdsForUserId(userId)
   
-  private def canReadPool_?(poolId: Long) = pools contains poolId
-
-  private case class RunFunc(f: () => Unit)
+  private def canReadPool_?(poolId: Long) = pools contains poolId  
 
   protected def messageHandler = {
       case m @ Distributor.UserUpdated(_) =>
@@ -112,9 +110,6 @@
         
       case RefreshMe(user) => 
          pools = Privilege.findViewablePools(user)
-         
-      case RunFunc(f) =>
-        f()
         
       case CreateMessage(text, tags, when, metaData, source, replyTo, pool) =>
         val tagLst = tags.removeDuplicates.map(Tag.findOrCreate)



Mime
View raw message