You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2009/04/23 20:49:21 UTC
svn commit: r768009 -
/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java
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();