You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2012/05/10 09:50:29 UTC
svn commit: r1336516 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/tomcat/util/net/AbstractEndpoint.java
webapps/docs/changelog.xml
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; }
+
+ public long getConnectionCount() {
+ if (connectionLimitLatch != null) {
+ return connectionLimitLatch.getCount();
+ }
+ return -1;
+ }
+
/**
* External Executor based thread pool.
*/
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1336516&r1=1336515&r2=1336516&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu May 10 07:50:29 2012
@@ -121,6 +121,11 @@
The new default value will never go above 2 regardless of
available processors. (fhanik)
</update>
+ <add>
+ Allow to retrieve the current <code>connectionCount</code>
+ via getter from the endpoint and as JMX attribute of the ThreadPool
+ mbean. (rjung)
+ </add>
</changelog>
</subsection>
<subsection name="Cluster">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1336516 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/AbstractEndpoint.java
webapps/docs/changelog.xml
Posted by Rainer Jung <ra...@kippdata.de>.
On 12.05.2012 19:23, Konstantin Kolinko wrote:
> 2012/5/10 sebb<se...@gmail.com>:
>> Javadoc?
>> In particular, it would help if the condition under which -1 is
>> returned were documented. ...
>>
>
> Done.
Thanks Konstantin.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1336516 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/tomcat/util/net/AbstractEndpoint.java webapps/docs/changelog.xml
Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/5/10 sebb <se...@gmail.com>:
> On 10 May 2012 08:50, <rj...@apache.org> 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1336516 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/tomcat/util/net/AbstractEndpoint.java webapps/docs/changelog.xml
Posted by sebb <se...@gmail.com>.
On 10 May 2012 08:50, <rj...@apache.org> 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. ...
> + public long getConnectionCount() {
> + if (connectionLimitLatch != null) {
> + return connectionLimitLatch.getCount();
> + }
> + return -1;
> + }
> +
> /**
> * External Executor based thread pool.
> */
>
> Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1336516&r1=1336515&r2=1336516&view=diff
> ==============================================================================
> --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu May 10 07:50:29 2012
> @@ -121,6 +121,11 @@
> The new default value will never go above 2 regardless of
> available processors. (fhanik)
> </update>
> + <add>
> + Allow to retrieve the current <code>connectionCount</code>
> + via getter from the endpoint and as JMX attribute of the ThreadPool
> + mbean. (rjung)
> + </add>
> </changelog>
> </subsection>
> <subsection name="Cluster">
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org