Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 22F43107AB for ; Tue, 17 Dec 2013 02:08:53 +0000 (UTC) Received: (qmail 69620 invoked by uid 500); 17 Dec 2013 02:08:53 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 69584 invoked by uid 500); 17 Dec 2013 02:08:53 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 69577 invoked by uid 99); 17 Dec 2013 02:08:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 02:08:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 02:08:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A4CF72388868; Tue, 17 Dec 2013 02:08:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1551442 - in /manifoldcf/branches/CONNECTORS-829/framework: agents/src/main/java/org/apache/manifoldcf/agents/system/ core/src/main/java/org/apache/manifoldcf/core/interfaces/ core/src/main/java/org/apache/manifoldcf/core/throttler/ Date: Tue, 17 Dec 2013 02:08:31 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131217020831.A4CF72388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwright Date: Tue Dec 17 02:08:31 2013 New Revision: 1551442 URL: http://svn.apache.org/r1551442 Log: Hook up throttle groups to polling Modified: manifoldcf/branches/CONNECTORS-829/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/IdleCleanupThread.java manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IThrottleGroups.java manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/ThrottleGroups.java manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/Throttler.java Modified: manifoldcf/branches/CONNECTORS-829/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/IdleCleanupThread.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-829/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/IdleCleanupThread.java?rev=1551442&r1=1551441&r2=1551442&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-829/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/IdleCleanupThread.java (original) +++ manifoldcf/branches/CONNECTORS-829/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/IdleCleanupThread.java Tue Dec 17 02:08:31 2013 @@ -55,6 +55,8 @@ public class IdleCleanupThread extends T ICacheManager cacheManager = CacheManagerFactory.make(threadContext); // Get the output connector pool handle IOutputConnectorPool outputConnectorPool = OutputConnectorPoolFactory.make(threadContext); + // Throttler subsystem + IThrottleGroups throttleGroups = ThrottleGroupsFactory.make(threadContext); /* For HSQLDB debugging... IDBInterface database = DBInterfaceFactory.make(threadContext, @@ -88,6 +90,9 @@ public class IdleCleanupThread extends T // Do the cleanup outputConnectorPool.pollAllConnectors(); + // Poll connection bins + throttleGroups.poll(); + // Expire objects cacheManager.expireObjects(System.currentTimeMillis()); // Sleep for the retry interval. Modified: manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IThrottleGroups.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IThrottleGroups.java?rev=1551442&r1=1551441&r2=1551442&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IThrottleGroups.java (original) +++ manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IThrottleGroups.java Tue Dec 17 02:08:31 2013 @@ -67,7 +67,12 @@ public interface IThrottleGroups */ public void poll(String throttleGroupType) throws ManifoldCFException; - + + /** Poll periodically, to update ALL cluster-wide statistics and allocation. + */ + public void poll() + throws ManifoldCFException; + /** Free all unused resources. */ public void freeUnusedResources() Modified: manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/ThrottleGroups.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/ThrottleGroups.java?rev=1551442&r1=1551441&r2=1551442&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/ThrottleGroups.java (original) +++ manifoldcf/branches/CONNECTORS-829/framework/core/src/main/java/org/apache/manifoldcf/core/throttler/ThrottleGroups.java Tue Dec 17 02:08:31 2013 @@ -104,6 +104,15 @@ public class ThrottleGroups implements I throttler.poll(threadContext, throttleGroupType); } + /** Poll periodically, to update ALL cluster-wide statistics and allocation. + */ + @Override + public void poll() + throws ManifoldCFException + { + throttler.poll(threadContext); + } + /** Free unused resources. */ @Override 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=1551442&r1=1551441&r2=1551442&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 Tue Dec 17 02:08:31 2013 @@ -150,6 +150,22 @@ public class Throttler } } + + /** Poll ALL bins periodically. + */ + public void poll(IThreadContext threadContext) + throws ManifoldCFException + { + // No waiting, so lock the entire tree. + synchronized (throttleGroupsHash) + { + for (ThrottlingGroups tg : throttleGroupsHash.values()) + { + tg.poll(threadContext); + } + } + + } /** Free unused resources. */