Uploaded image for project: 'Commons Pool'
  1. Commons Pool
  2. POOL-159

GenericObjectPool: Add a getNumWaiters() method for monitoring purposes

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4
    • Fix Version/s: 2.0
    • Labels:

      Description

      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(); }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mikemuller Mike Muller
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: