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/02/25 13:16:28 UTC
svn commit: r747762 - in /httpcomponents/httpclient/trunk: RELEASE_NOTES.txt
module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
Author: olegk
Date: Wed Feb 25 12:16:27 2009
New Revision: 747762
URL: http://svn.apache.org/viewvc?rev=747762&view=rev
Log:
HTTPCLIENT-823: 'http.conn-manager.max-total' parameter can be adjusted dynamically. However, the size of existing
connection pools per route, once allocated, will not be adjusted.
Modified:
httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
Modified: httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?rev=747762&r1=747761&r2=747762&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Wed Feb 25 12:16:27 2009
@@ -1,8 +1,13 @@
Changes since 4.0 beta 2
-------------------
-* [HTTPCLIENT-822] Default socket factories to rethrow SocketTimeoutException as
- ConnectTimeoutException in case of connect failure due to a time out.
+* [HTTPCLIENT-823] 'http.conn-manager.max-total' parameter can be adjusted
+ dynamically. However, the size of existing connection pools per route,
+ once allocated, will not be adjusted.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+* [HTTPCLIENT-822] Default socket factories to rethrow SocketTimeoutException
+ as ConnectTimeoutException in case of connect failure due to a time out.
Contributed by Oleg Kalnichevski <olegk at apache.org>
* [HTTPCLIENT-813] Fixed default port resolution. Invalid ports no longer
Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java?rev=747762&r1=747761&r2=747762&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java (original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java Wed Feb 25 12:16:27 2009
@@ -69,6 +69,8 @@
private final Log log = LogFactory.getLog(getClass());
+ protected final HttpParams params;
+
/** Connection operator for this pool */
protected final ClientConnectionOperator operator;
@@ -85,10 +87,6 @@
*/
protected final Map<HttpRoute, RouteSpecificPool> routeToPool;
- protected final int maxTotalConnections;
-
- private final ConnPerRoute connPerRoute;
-
/**
* Creates a new connection pool, managed by route.
*/
@@ -98,14 +96,11 @@
throw new IllegalArgumentException("Connection operator may not be null");
}
this.operator = operator;
+ this.params = params;
freeConnections = createFreeConnQueue();
waitingThreads = createWaitingThreadQueue();
routeToPool = createRouteToPoolMap();
- maxTotalConnections = ConnManagerParams
- .getMaxTotalConnections(params);
- connPerRoute = ConnManagerParams
- .getMaxConnectionsPerRoute(params);
}
@@ -149,6 +144,7 @@
* @return the new pool
*/
protected RouteSpecificPool newRouteSpecificPool(HttpRoute route) {
+ ConnPerRoute connPerRoute = ConnManagerParams.getMaxConnectionsPerRoute(params);
return new RouteSpecificPool(route, connPerRoute.getMaxForRoute(route));
}
@@ -264,6 +260,8 @@
WaitingThreadAborter aborter)
throws ConnectionPoolTimeoutException, InterruptedException {
+ int maxTotalConnections = ConnManagerParams.getMaxTotalConnections(params);
+
Date deadline = null;
if (timeout > 0) {
deadline = new Date