KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > cache > I_CmsLruCacheObject


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/cache/I_CmsLruCacheObject.java,v $
3  * Date : $Date: 2005/06/23 11:11:58 $
4  * Version: $Revision: 1.8 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.cache;
33
34 /**
35  * Defines the methods which an object being cached by CmsFlexLruCache must implement.<p>
36  *
37  * CmsFlexLruCache is organized as a double linked list, that's why objects implementing this interface
38  * need getters/setter for the next/previous nodes in the list of all cached objects.<p>
39  *
40  * @see CmsLruCache
41  *
42  * @author Thomas Weckert
43  *
44  * @version $Revision: 1.8 $
45  *
46  * @since 6.0.0
47  */

48 public interface I_CmsLruCacheObject {
49     
50     /**
51      * Set the next object in the double linked list of all cached objects.<p>
52      *
53      * @param theNextObject the next object
54      */

55     void setNextLruObject(I_CmsLruCacheObject theNextObject);
56     
57     /**
58      * Returns the next object in the double linked list of all cached objects.<p>
59      *
60      * @return the next object in the double linked list of all cached objects
61      */

62     I_CmsLruCacheObject getNextLruObject();
63     
64     /**
65      * Set the previous object in the double linked list of all cached objects.<p>
66      *
67      * @param thePreviousObject the previous object
68      */

69     void setPreviousLruObject(I_CmsLruCacheObject thePreviousObject);
70      
71     /**
72      * Returns the previous object in the double linked list of all cached objects.<p>
73      *
74      * @return the previous object in the double linked list of all cached objects
75      */

76     I_CmsLruCacheObject getPreviousLruObject();
77     
78     /**
79      * Invoked after an object was added to the cache.<p>
80      */

81     void addToLruCache();
82     
83     /**
84      * Invoked after the object was removed to the cache.<p>
85      */

86     void removeFromLruCache();
87     
88     /**
89      * Returns the cache costs of this object, as for example it's byte size.<p>
90      *
91      * @return the cache costs of this object
92      */

93     int getLruCacheCosts();
94     
95     /**
96      * Returns the Object value.<p>
97      *
98      * @return the Object value
99      */

100     Object JavaDoc getValue();
101 }
102
Popular Tags