01: /*
02: * Created on 24-Mar-2003
03: */
04: package net.sf.jportlet.service.cache;
05:
06: /**
07: * The <code>CacheRegion</code> manages a set of
08: * {@link net.sf.jportlet.service.cache.Cacheable} objects.
09: *
10: * @author <a href="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
11: */
12: public interface CacheRegion {
13: //~ Methods ----------------------------------------------------------------
14:
15: /**
16: * Return an object from the cache, or <code>null</code> if the object not
17: * in the cache
18: *
19: * @param id identificer of the object
20: * @return Cacheable
21: */
22: public Cacheable get(Object id);
23:
24: /**
25: * Returns the unique identifier of the region
26: * @return Object
27: */
28: public Object getId();
29:
30: /**
31: * Put an object into the cache
32: * @param obj
33: */
34: public void put(Cacheable obj);
35:
36: /**
37: * Remove all the expired object from the region.
38: * This method is called periodically by a <code>Thread</code>
39: */
40: public void removeExpiredObject();
41: }
|