454291 Added busy threads JMX attribute to QueuedThreadPool

Also-by: Tomasz Nurkiewicz <nurkiewicz@gmail.com>
Signed-off-by: Greg Wilkins <gregw@intalio.com>
This commit is contained in:
Greg Wilkins 2014-12-31 16:32:58 +01:00
parent d2cd28f7fa
commit 451e27e736
1 changed files with 9 additions and 0 deletions

View File

@ -405,6 +405,15 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo
return _threadsIdle.get();
}
/**
* @return The number of busy threads in the pool
*/
@ManagedAttribute("total number of busy threads in the pool")
public int getBusyThreads()
{
return getThreads() - getIdleThreads();
}
/**
* @return True if the pool is at maxThreads and there are not more idle threads than queued jobs
*/