Return-Path: Delivered-To: apmail-hc-commits-archive@www.apache.org Received: (qmail 80667 invoked from network); 23 Apr 2009 18:49:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Apr 2009 18:49:44 -0000 Received: (qmail 97756 invoked by uid 500); 23 Apr 2009 18:49:44 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 97726 invoked by uid 500); 23 Apr 2009 18:49:44 -0000 Mailing-List: contact commits-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 commits@hc.apache.org Received: (qmail 97717 invoked by uid 99); 23 Apr 2009 18:49:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 18:49:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 18:49:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 97C7E23889CF; Thu, 23 Apr 2009 18:49:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r768009 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java Date: Thu, 23 Apr 2009 18:49:21 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090423184921.97C7E23889CF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olegk Date: Thu Apr 23 18:49:21 2009 New Revision: 768009 URL: http://svn.apache.org/viewvc?rev=768009&view=rev Log: Made #revokeConnection() synchronized and alwaysShutDown final Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java?rev=768009&r1=768008&r2=768009&view=diff ============================================================================== --- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java (original) +++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java Thu Apr 23 18:49:21 2009 @@ -72,14 +72,17 @@ "Invalid use of SingleClientConnManager: connection still allocated.\n" + "Make sure to release the connection before allocating another one."; - /** The schemes supported by this connection manager. */ protected final SchemeRegistry schemeRegistry; /** The operator for opening and updating connections. */ protected final ClientConnectionOperator connOperator; + /** Whether the connection should be shut down on release. */ + protected final boolean alwaysShutDown; + /** The one and only entry in this pool. */ + @GuardedBy("this") protected PoolEntry uniquePoolEntry; /** The currently issued managed connection, if any. */ @@ -87,15 +90,13 @@ protected ConnAdapter managedConn; /** The time of the last connection release, or -1. */ + @GuardedBy("this") protected long lastReleaseTime; /** The time the last released connection expires and shouldn't be reused. */ @GuardedBy("this") protected long connectionExpiresTime; - /** Whether the connection should be shut down on release. */ - protected boolean alwaysShutDown; - /** Indicates whether this connection manager is shut down. */ protected volatile boolean isShutDown; @@ -342,7 +343,7 @@ * @deprecated no longer used */ @Deprecated - protected void revokeConnection() { + protected synchronized void revokeConnection() { if (managedConn == null) return; managedConn.detach();