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:
parent
d2cd28f7fa
commit
451e27e736
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue