qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritch...@apache.org
Subject svn commit: r691263 - in /incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server: queue/AMQQueue.java queue/SimpleAMQQueue.java virtualhost/VirtualHost.java
Date Tue, 02 Sep 2008 14:30:47 GMT
Author: ritchiem
Date: Tue Sep  2 07:30:47 2008
New Revision: 691263

URL: http://svn.apache.org/viewvc?rev=691263&view=rev
Log:
QPID-1266 - Provide a stop() method on AMQQueue to stop all processing on that queue thus
shutting down the ThreadPool.

Modified:
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java?rev=691263&r1=691262&r2=691263&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
Tue Sep  2 07:30:47 2008
@@ -161,6 +161,8 @@
 
     void deliverAsync();
 
+    void stop();
+
 
     /**
      * ExistingExclusiveSubscription signals a failure to create a subscription, because
an exclusive subscription

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java?rev=691263&r1=691262&r2=691263&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
Tue Sep  2 07:30:47 2008
@@ -1102,12 +1102,17 @@
             }
 
             _deleteTaskList.clear();
-            ReferenceCountingExecutorService.getInstance().releaseExecutorService();
+            stop();
         }
         return getMessageCount();
 
     }
 
+    public void stop()
+    {
+        ReferenceCountingExecutorService.getInstance().releaseExecutorService();
+    }
+
     public void deliverAsync()
     {
         _stateChangeCount.incrementAndGet();

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java?rev=691263&r1=691262&r2=691263&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
Tue Sep  2 07:30:47 2008
@@ -301,11 +301,20 @@
 
     public void close() throws Exception
     {
+        //Stop the Queues processing
+        if (_queueRegistry != null)
+        {
+            for (AMQQueue queue : _queueRegistry.getQueues())
+            {
+                queue.stop();
+            }
+        }        
+
         //Stop Housekeeping
         if (_houseKeepingTimer != null)
         {
             _houseKeepingTimer.cancel();
-        }
+        }        
 
         //Stop Connections
         _connectionRegistry.close();



Mime
View raw message