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

GenericObjectPool: Add a getNumWaiters() method for monitoring purposes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4
    • 2.0

    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

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

              Dates

                Created:
                Updated:
                Resolved: