KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Query result cache used for getNodes from MMObjectBuilder. So it contains only simple nodes (no
14  * clusternodes)
15  *
16  * @author Michiel Meeuwissen
17  * @version $Id: NodeListCache.java,v 1.4 2005/01/30 16:46:37 nico Exp $
18  * @see org.mmbase.module.core.MMObjectBuilder#getNodes
19  * @since MMBase-1.7
20  */

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

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