net.sf.jportlet.service.cache
Class CacheRegionImpl

java.lang.Object
  |
  +--net.sf.jportlet.service.cache.CacheRegionImpl
All Implemented Interfaces:
CacheRegion

public class CacheRegionImpl
extends java.lang.Object
implements CacheRegion

Implementation of CacheRegion

Author:
Herve Tchepannou

Constructor Summary
CacheRegionImpl(java.lang.Object id)
           
 
Method Summary
 net.sf.jportlet.service.cache.Cacheable get(java.lang.Object id)
          Return an object from the cache, or null if the object not in the cache
 java.lang.Object getId()
          Returns the unique identifier of the region
 void put(net.sf.jportlet.service.cache.Cacheable obj)
          Put an object into the cache
 void removeExpiredObject()
          Remove all the expired object from the region.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheRegionImpl

public CacheRegionImpl(java.lang.Object id)
Method Detail

get

public net.sf.jportlet.service.cache.Cacheable get(java.lang.Object id)
Description copied from interface: CacheRegion
Return an object from the cache, or null if the object not in the cache

Specified by:
get in interface CacheRegion
Parameters:
id - identificer of the object
Returns:
Cacheable
See Also:
CacheRegion.get(java.lang.Object)

getId

public java.lang.Object getId()
Description copied from interface: CacheRegion
Returns the unique identifier of the region

Specified by:
getId in interface CacheRegion
Returns:
Object
See Also:
CacheRegion.getId()

put

public void put(net.sf.jportlet.service.cache.Cacheable obj)
Description copied from interface: CacheRegion
Put an object into the cache

Specified by:
put in interface CacheRegion
Parameters:
obj -
See Also:
CacheRegion.put(net.sf.jportlet.service.cache.Cacheable)

removeExpiredObject

public void removeExpiredObject()
Description copied from interface: CacheRegion
Remove all the expired object from the region. This method is called periodically by a Thread

Specified by:
removeExpiredObject in interface CacheRegion
See Also:
CacheRegion.removeExpiredObject()


Copyright © 2002 Herve Tchepannou. All Rights Reserved.