Author: rjung
Date: Thu May 10 07:45:41 2012
New Revision: 1336515

URL: http://svn.apache.org/viewvc?rev=1336515&view=rev
Log:
Add public method to retrieve the current connectionCount
from an endpoint.

It will also show up in the ThreadPool MBean.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1336515&r1=1336514&r2=1336515&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Thu May 
10 07:45:41 2012
@@ -173,6 +173,14 @@ public abstract class AbstractEndpoint {
     }
 
     public int  getMaxConnections() { return this.maxConnections; }
+
+    public long getConnectionCount() {
+        if (connectionLimitLatch != null) {
+            return connectionLimitLatch.getCount();
+        }
+        return -1;
+    }
+
     /**
      * External Executor based thread pool.
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to