commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Muller (JIRA)" <j...@apache.org>
Subject [jira] Created: (POOL-159) GenericObjectPool: Add a getNumWaiters() method for monitoring purposes
Date Sun, 21 Feb 2010 18:15:30 GMT
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.4
            Reporter: Mike Muller


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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message