svn commit: r883227 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/cache/UtilCache.java webtools/webapp/webtools/WEB-INF/actions/cache/FindUtilCache.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r883227 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/cache/UtilCache.java webtools/webapp/webtools/WEB-INF/actions/cache/FindUtilCache.groovy

doogie-3
Author: doogie
Date: Mon Nov 23 03:04:50 2009
New Revision: 883227

URL: http://svn.apache.org/viewvc?rev=883227&view=rev
Log:
Add a helper method, getUtilCacheTableKeySet, and use that in
FindUtilCache.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/cache/FindUtilCache.groovy

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java?rev=883227&r1=883226&r2=883227&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java Mon Nov 23 03:04:50 2009
@@ -21,6 +21,7 @@
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.MissingResourceException;
@@ -424,6 +425,14 @@
         return list;
     }
 
+    public static Set<String> getUtilCacheTableKeySet() {
+        Set<String> set = new HashSet<String>(utilCacheTable.size());
+        synchronized (utilCacheTable) {
+            set.addAll(utilCacheTable.keySet());
+        }
+        return set;
+    }
+
     /** Getter for the name of the UtilCache instance.
      * @return The name of the instance
      */

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/cache/FindUtilCache.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/cache/FindUtilCache.groovy?rev=883227&r1=883226&r2=883227&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/cache/FindUtilCache.groovy (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/cache/FindUtilCache.groovy Mon Nov 23 03:04:50 2009
@@ -29,7 +29,7 @@
 context.maxMemory = UtilFormatOut.formatQuantity(rt.maxMemory());
 
 cacheList = [];
-names = new TreeSet(UtilCache.utilCacheTable.keySet());
+names = new TreeSet(UtilCache.getUtilCacheTableKeySet());
 names.each { cacheName ->
         utilCache = UtilCache.findCache(cacheName);
         cache = [:];