Author: jfrederic.clere(a)jboss.com
Date: 2008-04-07 07:48:48 -0400 (Mon, 07 Apr 2008)
New Revision: 580
Modified:
trunk/java/org/apache/catalina/core/StandardThreadExecutor.java
Log:
Submitted by Ruediger Pluem. PR#44595.
Allows to check the QueueSize of an executor via JMX.
Modified: trunk/java/org/apache/catalina/core/StandardThreadExecutor.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardThreadExecutor.java 2008-04-02 13:03:35
UTC (rev 579)
+++ trunk/java/org/apache/catalina/core/StandardThreadExecutor.java 2008-04-07 11:48:48
UTC (rev 580)
@@ -193,6 +193,10 @@
return (executor != null) ? executor.getPoolSize() : 0;
}
+ public int getQueueSize() {
+ return (executor != null) ? executor.getQueue().size() : -1;
+ }
+
// ---------------------------------------------- TaskQueue Inner Class
class TaskQueue extends LinkedBlockingQueue<Runnable> {
ThreadPoolExecutor parent = null;
@@ -254,4 +258,4 @@
}
-}
\ No newline at end of file
+}
Show replies by date