KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > lib > cache > CacheEntry


1 /*
2  * CoadunationLib: The coaduntion implementation library.
3  * Copyright (C) 2006 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * CacheEntry.java
20  *
21  * This is a basic generic cache entry interface. It can be used by classes
22  * needing to be placed in a cache.
23  */

24
25 // package path
26
package com.rift.coad.lib.cache;
27
28 // java imports
29
import java.util.Date JavaDoc;
30
31
32 /**
33  * This is a basic generic cache entry interface. It can be used by classes
34  * needing to be placed in a cache.
35  *
36  * @author Brett Chaldecott
37  */

38 public interface CacheEntry {
39     /**
40      * The touch method use to update the last touch time of a cache entry.
41      */

42     public void touch();
43     
44     
45     /**
46      * This method will return true if the date is older than the given expiry
47      * date.
48      *
49      * @return TRUE if expired FALSE if not.
50      * @param expiryDate The expiry date to perform the check with.
51      */

52     public boolean isExpired(Date JavaDoc expiryDate);
53     
54     
55     /**
56      * This method is called by the cache when an object is removed.
57      */

58     public void cacheRelease();
59 }
60
Popular Tags