Update of /var/cvs/src/org/mmbase/cache
In directory james.mmbase.org:/tmp/cvs-serv9914
Modified Files:
CacheManager.java
Log Message:
dropped getQuery|Cache in favour of getCaches(classname)
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/cache
Index: CacheManager.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/cache/CacheManager.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- CacheManager.java 3 Feb 2008 17:33:56 -0000 1.21
+++ CacheManager.java 23 Feb 2008 13:33:26 -0000 1.22
@@ -24,7 +24,7 @@
* Cache manager manages the static methods of [EMAIL PROTECTED] Cache}. If
you prefer you can call them on this in stead.
*
* @since MMBase-1.8
- * @version $Id: CacheManager.java,v 1.21 2008/02/03 17:33:56 nklasens Exp $
+ * @version $Id: CacheManager.java,v 1.22 2008/02/23 13:33:26 michiel Exp $
*/
public class CacheManager {
@@ -55,12 +55,16 @@
public static Bean getBean(String name) {
return new Bean(getCache(name));
}
- public static Set<Bean> getQueryCaches() {
+ public static Set<Bean> getCaches(String className) {
Set<Bean> result = new HashSet<Bean>();
for (Cache c : caches.values()) {
- if (c instanceof QueryResultCache) {
+ try {
+ if (className != null &&
Class.forName(className).isInstance(c)) {
result.add(new Bean(c));
}
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
}
return result;
}
@@ -75,7 +79,7 @@
}
/**
- * @since MMBase-1.9
+ * @since MMBase-1.8.6
*/
public static Map<String, Cache<?, ?>> getMap() {
return Collections.unmodifiableMap(caches);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs