OSDN Git Service

DO NOT MERGE: Rewrite the HTTP connection pool used by HttpURLConnection.
authorJesse Wilson <jessewilson@google.com>
Thu, 6 May 2010 17:54:21 +0000 (10:54 -0700)
committerJesse Wilson <jessewilson@google.com>
Thu, 6 May 2010 17:54:51 +0000 (10:54 -0700)
commitfd1674c75d7b6500168137a2213877e45e49bbd2
tree1d554f2ada04138ccfb4f926bd8113a81804f6bb
parent4751c150542ec282f6c6d58984974edec6c0a045
DO NOT MERGE: Rewrite the HTTP connection pool used by HttpURLConnection.

This started off as incremental changes, but it ended up going
far enough that it earned the "rewrite" badge.

System.getProperty() is not called for every HTTP connection.
This is slightly controversial, but the old code had to bend
over backwards to support dynamic pool changes, and it didn't
even support the case when the pool shrank but not to 0.

The new code doesn't do I/O within static synchronized blocks.
This should reduce contention described here: http://b/issue?id=2606547

Also: simpify implementation, prettier names, more focused doc.

Originally submitted to dalvik-dev.
  https://android-git.corp.google.com/g/49309

Change-Id: I815c3123838b29cd2d9b39346e5c2486e1f5a2d2
libcore/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
libcore/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnectionManager.java [deleted file]
libcore/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnectionPool.java [new file with mode: 0644]
libcore/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
libcore/luni/src/test/java/java/net/URLConnectionTest.java
libcore/support/src/test/java/tests/support/Support_TestWebServer.java