You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2013/12/15 00:08:12 UTC

svn commit: r1550983 - /manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java

Author: kwright
Date: Sat Dec 14 23:08:12 2013
New Revision: 1550983

URL: http://svn.apache.org/r1550983
Log:
Add throttlegroup bin shutdown and removal

Modified:
    manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java

Modified: manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java?rev=1550983&r1=1550982&r2=1550983&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java (original)
+++ manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java Sat Dec 14 23:08:12 2013
@@ -546,7 +546,39 @@ public class Throttler
     public synchronized void destroy(IThreadContext threadContext)
       throws ManifoldCFException
     {
-      freeUnusedResources(threadContext);
+      synchronized (connectionBins)
+      {
+        Iterator<ConnectionBin> binIter = connectionBins.values().iterator();
+        while (binIter.hasNext())
+        {
+          ConnectionBin bin = binIter.next();
+          bin.shutDown();
+          binIter.remove();
+        }
+      }
+      
+      synchronized (fetchBins)
+      {
+        Iterator<FetchBin> binIter = fetchBins.values().iterator();
+        while (binIter.hasNext())
+        {
+          FetchBin bin = binIter.next();
+          bin.shutDown();
+          binIter.remove();
+        }
+      }
+      
+      synchronized (throttleBins)
+      {
+        Iterator<ThrottleBin> binIter = throttleBins.values().iterator();
+        while (binIter.hasNext())
+        {
+          ThrottleBin bin = binIter.next();
+          bin.shutDown();
+          binIter.remove();
+        }
+      }
+
       // End service activity
       isAlive = false;
       notifyAll();