2012/5/10 sebb <[email protected]>:
> On 10 May 2012 08:50, <[email protected]> wrote:
>> Author: rjung
>> Date: Thu May 10 07:50:29 2012
>> New Revision: 1336516
>>
>> URL: http://svn.apache.org/viewvc?rev=1336516&view=rev
>> Log:
>> Add public method to retrieve the current connectionCount
>> from an endpoint.
>>
>> It will also show up in the ThreadPool MBean.
>>
>> Backport of r1336515 from trunk.
>>
>> Modified:
>> tomcat/tc7.0.x/trunk/ (props changed)
>> tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>
>> Propchange: tomcat/tc7.0.x/trunk/
>> ------------------------------------------------------------------------------
>> Merged /tomcat/trunk:r1336515
>>
>> Modified:
>> tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
>> URL:
>> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1336516&r1=1336515&r2=1336516&view=diff
>> ==============================================================================
>> ---
>> tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
>> (original)
>> +++
>> tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
>> Thu May 10 07:50:29 2012
>> @@ -173,6 +173,14 @@ public abstract class AbstractEndpoint {
>> }
>>
>> public int getMaxConnections() { return this.maxConnections; }
>> +
>
> Javadoc?
> In particular, it would help if the condition under which -1 is
> returned were documented. ...
>
Done.
>> + public long getConnectionCount() {
>> + if (connectionLimitLatch != null) {
>> + return connectionLimitLatch.getCount();
>> + }
>> + return -1;
>> + }
>> +
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]