Source code: com/opencms/flex/util/I_CmsFlexLruCacheObject.java
1 /*
2 * File : $Source: /usr/local/cvs/opencms/src/com/opencms/flex/util/Attic/I_CmsFlexLruCacheObject.java,v $
3 * Date : $Date: 2003/02/26 15:19:23 $
4 * Version: $Revision: 1.4 $
5 *
6 * This library is part of OpenCms -
7 * the Open Source Content Mananagement System
8 *
9 * Copyright (C) 2002 - 2003 Alkacon Software (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, 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 com.opencms.flex.util;
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 com.opencms.flex.util.CmsFlexLruCache
41 * @author Thomas Weckert (t.weckert@alkacon.com)
42 * @version $Revision: 1.4 $
43 */
44 public interface I_CmsFlexLruCacheObject {
45
46 /**
47 * Set the next object in the double linked list of all cached objects.<p>
48 *
49 * @param theNextObject the next object
50 */
51 public void setNextLruObject( I_CmsFlexLruCacheObject theNextObject );
52
53 /**
54 * Returns the next object in the double linked list of all cached objects.<p>
55 *
56 * @return the next object in the double linked list of all cached objects
57 */
58 public I_CmsFlexLruCacheObject getNextLruObject();
59
60 /**
61 * Set the previous object in the double linked list of all cached objects.<p>
62 *
63 * @param thePreviousObject the previous object
64 */
65 public void setPreviousLruObject( I_CmsFlexLruCacheObject thePreviousObject );
66
67 /**
68 * Returns the previous object in the double linked list of all cached objects.<p>
69 *
70 * @return the previous object in the double linked list of all cached objects
71 */
72 public I_CmsFlexLruCacheObject getPreviousLruObject();
73
74 /**
75 * Invoked after an object was added to the cache.<p>
76 */
77 public void addToLruCache();
78
79 /**
80 * Invoked after the object was removed to the cache.<p>
81 */
82 public void removeFromLruCache();
83
84 /**
85 * Returns the cache costs of this object, as for example it's byte size.<p>
86 *
87 * @return the cache costs of this object
88 */
89 public int getLruCacheCosts();
90 }