KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > cache > AggregatedResultCache


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.cache;
11
12 /**
13  * Cache for queries like SELECT COUNT(number) AS number FROM mm_news news.
14  *
15  * @author Michiel Meeuwissen
16  * @version $Id: AggregatedResultCache.java,v 1.3 2005/01/30 16:46:37 nico Exp $
17  * @see org.mmbase.bridge.implementation.BasicCloud#getList
18  * @todo It is odd that this query cache is called in the bridge implementation and not in the core.
19  * @since MMBase-1.7
20  */

21 public class AggregatedResultCache extends QueryResultCache {
22
23     // There will be only one multilevel cache, and here it is:
24
private static AggregatedResultCache cache;
25
26     public static AggregatedResultCache getCache() {
27         return cache;
28     }
29
30     static {
31         cache = new AggregatedResultCache(300);
32         cache.putCache();
33     }
34
35     public String JavaDoc getName() {
36         return "AggregatedResultCache";
37     }
38     public String JavaDoc getDescription() {
39         return "Aggregating Query Results";
40     }
41
42     /**
43      * Creates the cache.
44      */

45     private AggregatedResultCache(int size) {
46         super(size);
47     }
48         
49 }
50
Popular Tags