Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F168ADD71 for ; Thu, 25 Oct 2012 21:13:12 +0000 (UTC) Received: (qmail 45345 invoked by uid 500); 25 Oct 2012 21:13:12 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 45309 invoked by uid 500); 25 Oct 2012 21:13:12 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 45301 invoked by uid 99); 25 Oct 2012 21:13:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2012 21:13:12 +0000 Date: Thu, 25 Oct 2012 21:13:12 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Message-ID: <1616559365.29422.1351199592777.JavaMail.jiratomcat@arcas> In-Reply-To: <259683389.82325.1347656647457.JavaMail.jiratomcat@arcas> Subject: [jira] [Resolved] (HTTPCORE-311) Retrieval of primitive connection pool stat values MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCORE-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski resolved HTTPCORE-311. ---------------------------------------- Resolution: Won't Fix > Retrieval of primitive connection pool stat values > -------------------------------------------------- > > Key: HTTPCORE-311 > URL: https://issues.apache.org/jira/browse/HTTPCORE-311 > Project: HttpComponents HttpCore > Issue Type: New Feature > Components: HttpCore > Affects Versions: 4.2.1 > Reporter: Seth Weiner > Attachments: httpcomponents-monitoring-patch2.diff, httpcomponents-monitoring-patch3.diff, httpcomponents-monitoring-patch.diff, PollingPrimitivePoolControl.java, PollingPrimitivePoolControlTest.java, PrimitiveConnPoolControl.java > > > The org.apache.http.pool.ConnPoolControl interface exposes valuable runtime metrics for a connection pool's individual routes and global values. However, it uses a bean class, org.apache.http.pool.PoolStats, to exposes the global values. This is problematic when trying to monitor these connection pool values at runtime since PoolStats is not Serializable and many jmx monitoring agents only support primitive values well. The value of the PoolStats class seems to be in trying to minimize the amount of locking of the pool required to get stats. > The attached patch includes an interface that extends ConnPoolControl to add four methods to return the primitive value for global pool stats. There's an implementation of this interface that will delegate all of the ConnPoolControl methods to a delegate instance, and support retrieving the primitive global values by periodically retrieving and caching a PoolStats instance internally. This minimizes the amount of locking required while also making it easy to monitor these values. > It would probably be ideal to incorporate this functionality directly into the existing ConnPoolControl interface, but the attached code provides a non-invasive way to achieve the desired effect. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org