Author: jonesde
Date: Sat Sep 8 03:34:54 2007
New Revision: 573814
URL:
http://svn.apache.org/viewvc?rev=573814&view=revLog:
Added handy method for doing a wait in a static method and without making the whole thing synchronized
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java?rev=573814&r1=573813&r2=573814&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java Sat Sep 8 03:34:54 2007
@@ -800,4 +800,13 @@
}
}
}
+
+ public static void staticWait(long timeout) throws InterruptedException {
+ new UtilMiscWaiter().safeWait(timeout);
+ }
+ protected static class UtilMiscWaiter {
+ public synchronized void safeWait(long timeout) throws InterruptedException {
+ this.wait(timeout);
+ }
+ }
}