qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1229112 - in /qpid/trunk/qpid/java: broker/src/main/java/org/apache/qpid/server/configuration/ broker/src/main/java/org/apache/qpid/server/queue/ broker/src/test/java/org/apache/qpid/server/configuration/ common/src/main/java/org/apache/qp...
Date Mon, 09 Jan 2012 12:30:55 GMT
Author: robbie
Date: Mon Jan  9 12:30:54 2012
New Revision: 1229112

URL: http://svn.apache.org/viewvc?rev=1229112&view=rev
Log:
QPID-3730: remove ReadWriteJobQueue, it is no longer necessary as the only things now using
the thread pool are write jobs, so there is no need/benefit to request it be write-biased.

Removed:
    qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/ReadWriteJobQueue.java
    qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/ReadWriteRunnable.java
Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueRunner.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubFlushRunner.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
    qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java?rev=1229112&r1=1229111&r2=1229112&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
Mon Jan  9 12:30:54 2012
@@ -89,7 +89,6 @@ public class ServerConfiguration extends
         envVarMap.put("QPID_PORT", "connector.port");
         envVarMap.put("QPID_ENABLEDIRECTBUFFERS", "advanced.enableDirectBuffers");
         envVarMap.put("QPID_SSLPORT", "connector.ssl.port");
-        envVarMap.put("QPID_WRITEBIASED", "advanced.useWriteBiasedPool");
         envVarMap.put("QPID_JMXPORT_REGISTRYSERVER", MGMT_JMXPORT_REGISTRYSERVER);
         envVarMap.put("QPID_JMXPORT_CONNECTORSERVER", MGMT_JMXPORT_CONNECTORSERVER);
         envVarMap.put("QPID_FRAMESIZE", "advanced.framesize");
@@ -736,11 +735,6 @@ public class ServerConfiguration extends
         return getStringValue("connector.ssl.certType", "SunX509");
     }
 
-    public boolean getUseBiasedWrites()
-    {
-        return getBooleanValue("advanced.useWriteBiasedPool");
-    }
-
     public String getDefaultVirtualHost()
     {
         return getStringValue("virtualhosts.default");

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueRunner.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueRunner.java?rev=1229112&r1=1229111&r2=1229112&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueRunner.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueRunner.java
Mon Jan  9 12:30:54 2012
@@ -22,7 +22,6 @@ package org.apache.qpid.server.queue;
 
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
-import org.apache.qpid.pool.ReadWriteRunnable;
 import org.apache.qpid.server.logging.actors.CurrentActor;
 import org.apache.qpid.server.queue.QueueRunner;
 import org.apache.qpid.server.queue.SimpleAMQQueue;
@@ -38,7 +37,7 @@ import java.util.concurrent.atomic.Atomi
  * when straight-through delivery of a message to a subscription isn't
  * possible during the enqueue operation.
  */
-public class QueueRunner implements ReadWriteRunnable
+public class QueueRunner implements Runnable
 {
     private static final Logger _logger = Logger.getLogger(QueueRunner.class);
 
@@ -99,16 +98,6 @@ public class QueueRunner implements Read
         }
     }
 
-    public boolean isRead()
-    {
-        return false;
-    }
-
-    public boolean isWrite()
-    {
-        return true;
-    }
-
     public String toString()
     {
         return "QueueRunner-" + _queue.getLogActor();

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java?rev=1229112&r1=1229111&r2=1229112&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
Mon Jan  9 12:30:54 2012
@@ -23,7 +23,6 @@ import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.AMQSecurityException;
 import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.pool.ReadWriteRunnable;
 import org.apache.qpid.pool.ReferenceCountingExecutorService;
 import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
 import org.apache.qpid.server.protocol.AMQSessionModel;
@@ -288,7 +287,7 @@ public class SimpleAMQQueue implements A
 
     // ------ Getters and Setters
 
-    public void execute(ReadWriteRunnable runnable)
+    public void execute(Runnable runnable)
     {
         _asyncDelivery.execute(runnable);
     }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubFlushRunner.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubFlushRunner.java?rev=1229112&r1=1229111&r2=1229112&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubFlushRunner.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubFlushRunner.java
Mon Jan  9 12:30:54 2012
@@ -21,18 +21,17 @@ package org.apache.qpid.server.queue;
  */
 
 
-import org.apache.qpid.pool.ReadWriteRunnable;
-import org.apache.qpid.server.subscription.Subscription;
-import org.apache.qpid.server.logging.actors.CurrentActor;
-import org.apache.qpid.AMQException;
-import org.apache.log4j.Logger;
-
 import java.util.concurrent.Executor;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.log4j.Logger;
+import org.apache.qpid.AMQException;
+import org.apache.qpid.server.logging.actors.CurrentActor;
+import org.apache.qpid.server.subscription.Subscription;
+
 
-class SubFlushRunner implements ReadWriteRunnable
+class SubFlushRunner implements Runnable
 {
     private static final Logger _logger = Logger.getLogger(SubFlushRunner.class);
 
@@ -90,16 +89,6 @@ class SubFlushRunner implements ReadWrit
         return (SimpleAMQQueue) _sub.getQueue();
     }
 
-    public boolean isRead()
-    {
-        return false;
-    }
-
-    public boolean isWrite()
-    {
-        return true;
-    }
-
     public String toString()
     {
         return "SubFlushRunner-" + _sub.getLogActor();

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java?rev=1229112&r1=1229111&r2=1229112&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
(original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
Mon Jan  9 12:30:54 2012
@@ -600,19 +600,6 @@ public class ServerConfigurationTest ext
         assertEquals("a", _serverConfig.getConnectorCertType());
     }
 
-    public void testGetUseBiasedWrites() throws ConfigurationException
-    {
-        // Check default
-        _serverConfig.initialise();
-        assertEquals(false, _serverConfig.getUseBiasedWrites());
-
-        // Check value we set
-        _config.setProperty("advanced.useWriteBiasedPool", true);
-        _serverConfig = new ServerConfiguration(_config);
-        _serverConfig.initialise();
-        assertEquals(true, _serverConfig.getUseBiasedWrites());
-    }
-
     public void testGetHousekeepingCheckPeriod() throws ConfigurationException
     {
         // Check default

Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java?rev=1229112&r1=1229111&r2=1229112&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java
(original)
+++ qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java
Mon Jan  9 12:30:54 2012
@@ -96,8 +96,6 @@ public class ReferenceCountingExecutorSe
      */
     private ThreadFactory _threadFactory = Executors.defaultThreadFactory();
 
-    private final boolean _useBiasedPool = Boolean.getBoolean("org.apache.qpid.use_write_biased_pool");
-
     /**
      * Retrieves the singleton instance of this reference counter.
      *
@@ -125,26 +123,12 @@ public class ReferenceCountingExecutorSe
         {
             if (_refCount++ == 0)
             {
-                // Use a job queue that biases to writes
-                if(_useBiasedPool)
-                {
-                    _pool =  new ThreadPoolExecutor(_poolSize, _poolSize,
-                                          0L, TimeUnit.MILLISECONDS,
-                                          new ReadWriteJobQueue(),
-                                          _threadFactory);
-
-                }
-                else
-                {
-                    _pool = new ThreadPoolExecutor(_poolSize, _poolSize,
-                            0L, TimeUnit.MILLISECONDS,
-                            new LinkedBlockingQueue<Runnable>(),
-                            _threadFactory);
-                }
-
+                _pool = new ThreadPoolExecutor(_poolSize, _poolSize,
+                        0L, TimeUnit.MILLISECONDS,
+                        new LinkedBlockingQueue<Runnable>(),
+                        _threadFactory);
             }
 
-
             return _pool;
         }
     }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message