Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 67EEF10142 for ; Wed, 31 Dec 2014 16:32:13 +0000 (UTC) Received: (qmail 20734 invoked by uid 500); 31 Dec 2014 16:32:13 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 20640 invoked by uid 500); 31 Dec 2014 16:32:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 20628 invoked by uid 99); 31 Dec 2014 16:32:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Dec 2014 16:32:13 +0000 Date: Wed, 31 Dec 2014 16:32:13 +0000 (UTC) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (POOL-159) GenericObjectPool: Add a getNumWaiters() method for monitoring purposes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/POOL-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz closed POOL-159. ---------------------------- > GenericObjectPool: Add a getNumWaiters() method for monitoring purposes > ----------------------------------------------------------------------- > > Key: POOL-159 > URL: https://issues.apache.org/jira/browse/POOL-159 > Project: Commons Pool > Issue Type: Improvement > Affects Versions: 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4 > Reporter: Mike Muller > Labels: monitoring > Fix For: 2.0 > > > I would like to be able to determine the number of threads waiting to obtain an object from the pool for monitoring purposes. This would be most applicable when the WHEN_EXHAUSTED_BLOCK option is used. I propose the following method: > /** > * Return the number of threads currently waiting for an object from this pool. > * > * @return the number of threads currently waiting for an object from this pool > */ > public synchronized int getNumWaiters() { > return _allocateQueue.size(); > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)