Author: doogie
Date: Wed Mar 24 03:22:54 2010
New Revision: 926924

URL: http://svn.apache.org/viewvc?rev=926924&view=rev
Log:
ExecutionPool.pulseAll now requires a class filter.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java

Modified: 
ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java?rev=926924&r1=926923&r2=926924&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java 
(original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java 
Wed Mar 24 03:22:54 2010
@@ -81,12 +81,14 @@ public final class ExecutionPool {
         delayQueue.remove(pulse);
     }
 
-    public static void pulseAll() {
+    public static void pulseAll(Class<? extends Pulse> match) {
         Iterator<Pulse> it = delayQueue.iterator();
         while (it.hasNext()) {
             Pulse pulse = it.next();
-            it.remove();
-            pulse.run();
+            if (match.isInstance(pulse)) {
+                it.remove();
+                pulse.run();
+            }
         }
     }
 

Modified: 
ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java?rev=926924&r1=926923&r2=926924&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java 
(original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java Wed 
Mar 24 03:22:54 2010
@@ -80,7 +80,7 @@ public abstract class TTLObject<T> imple
     }
 
     public static void pulseAll() {
-        ExecutionPool.pulseAll();
+        ExecutionPool.pulseAll(Pulse.class);
     }
 
     public enum State { INVALID, REGEN, REGENERATING, GENERATE, GENERATING, 
GENERATING_INITIAL, VALID, ERROR, ERROR_INITIAL, SET }


Reply via email to