activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1035436 - in /activemq/activemq-apollo/trunk: apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java
Date Mon, 15 Nov 2010 20:39:10 GMT
Author: chirino
Date: Mon Nov 15 20:39:10 2010
New Revision: 1035436

URL: http://svn.apache.org/viewvc?rev=1035436&view=rev
Log:
Made the connection regroup feature an option that can be enabled via config

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
    activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala?rev=1035436&r1=1035435&r2=1035436&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
Mon Nov 15 20:39:10 2010
@@ -190,7 +190,9 @@ class VirtualHost(val broker: Broker, va
 
     tracker.callback(onCompleted)
 
-    schedualConnectionRegroup
+    if(config.regroup_connections.getOrElse(false)) {
+      schedual_connection_regroup
+    }
   }
 
 
@@ -214,7 +216,7 @@ class VirtualHost(val broker: Broker, va
 
   // Try to periodically re-balance connections so that consumers/producers
   // are grouped onto the same thread.
-  def schedualConnectionRegroup:Unit = {
+  def schedual_connection_regroup:Unit = {
     def connectionRegroup = {
 
       // this should really be much more fancy.  It should look at the messaging
@@ -253,7 +255,7 @@ class VirtualHost(val broker: Broker, va
 
         }
       }
-      schedualConnectionRegroup
+      schedual_connection_regroup
     }
     dispatchQueue.dispatchAfter(1, TimeUnit.SECONDS, ^{ if(serviceState.isStarted) { connectionRegroup
} } )
   }

Modified: activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java?rev=1035436&r1=1035435&r2=1035436&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java
Mon Nov 15 20:39:10 2010
@@ -55,5 +55,10 @@ public class VirtualHostDTO extends Serv
     @XmlElement(name="destination")
     public ArrayList<DestinationDTO> destinations = new ArrayList<DestinationDTO>();
 
+    /**
+     * Should connections get regroups so they get serviced by the same thread?
+     */
+    @XmlAttribute(name="regroup_connections")
+    public Boolean regroup_connections;
 
 }



Mime
View raw message