commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r354829 - /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.java
Date Wed, 07 Dec 2005 19:05:18 GMT
Author: olegk
Date: Wed Dec  7 11:05:13 2005
New Revision: 354829

URL: http://svn.apache.org/viewcvs?rev=354829&view=rev
Log:
Changelog: 
* Made all methods synchronized
* shutdown() will immediately unblock the thread if it is blocked waiting

Contributed by Michael Becke

Modified:
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.java

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.java?rev=354829&r1=354828&r2=354829&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.java
Wed Dec  7 11:05:13 2005
@@ -108,6 +108,7 @@
      */
     public synchronized void shutdown() {
         this.shutdown = true;
+        this.notifyAll();
     }
     
     /**
@@ -117,7 +118,7 @@
      * 
      * @see HttpConnectionManager#closeIdleConnections(long)
      */
-    public void setConnectionTimeout(long connectionTimeout) {
+    public synchronized void setConnectionTimeout(long connectionTimeout) {
         if (shutdown) {
             throw new IllegalStateException("IdleConnectionTimeoutThread has been shutdown");
         }
@@ -129,7 +130,7 @@
      *  
      * @param timeoutInterval The timeout interval in milliseconds
      */
-    public void setTimeoutInterval(long timeoutInterval) {
+    public synchronized void setTimeoutInterval(long timeoutInterval) {
         if (shutdown) {
             throw new IllegalStateException("IdleConnectionTimeoutThread has been shutdown");
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message