01: /*
02: * Created on 24-Mar-2003
03: */
04: package net.sf.jportlet.service.cache;
05:
06: /**
07: * The <code>Cacheable</code> represents an object that can be inserted into
08: * the cache
09: *
10: * @author <a href="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
11: */
12: public interface Cacheable {
13: //~ Methods ----------------------------------------------------------------
14:
15: /**
16: * Returns the data
17: * @return boolean
18: */
19: public Object getData();
20:
21: /**
22: * Returns if object unique identifier
23: * @return Object
24: */
25: public Object getId();
26:
27: /**
28: * Returns <code>true</code> if the object has expired
29: * @return boolean
30: */
31: public boolean isExpired();
32:
33: /**
34: * Force the object to expire
35: */
36: public void expire();
37: }
|