|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.portal.service.cache.AbstractCacheableService
public abstract class AbstractCacheableService
Base implementation for a cacheable service
| Constructor Summary | |
|---|---|
AbstractCacheableService()
|
|
| Method Summary | |
|---|---|
Object |
clone()
|
void |
dispose()
|
void |
enableCache(boolean bEnable)
Enable the cache |
net.sf.ehcache.Cache |
getCache()
Return a cache object |
int |
getCacheSize()
Gets the number of item currently in the cache. |
Object |
getFromCache(String strKey)
Gets an object from the cache |
String |
getInfos()
Returns cache infos |
List<String> |
getKeys()
Gets all keys in the cache |
int |
getMaxElements()
Returns maximum elements accepted into the cache |
long |
getMemorySize()
Return the memory size |
long |
getTimeToLive()
Returns the time to live for objects in the cache |
void |
initCache()
Init the cache. |
void |
initCache(String strCacheName)
Init the cache. |
boolean |
isCacheEnable()
Gets the current cache status. |
void |
notifyElementEvicted(net.sf.ehcache.Ehcache ehch,
net.sf.ehcache.Element elmnt)
|
void |
notifyElementExpired(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
|
void |
notifyElementPut(net.sf.ehcache.Ehcache ehch,
net.sf.ehcache.Element elmnt)
|
void |
notifyElementRemoved(net.sf.ehcache.Ehcache ehch,
net.sf.ehcache.Element elmnt)
|
void |
notifyElementUpdated(net.sf.ehcache.Ehcache ehch,
net.sf.ehcache.Element elmnt)
|
void |
notifyRemoveAll(net.sf.ehcache.Ehcache ehch)
|
void |
putInCache(String strKey,
Object object)
Put an object into the cache |
void |
removeKey(String strKey)
Remove a key from the cache |
void |
resetCache()
Reset the cache. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface fr.paris.lutece.portal.service.util.LuteceService |
|---|
getName |
| Constructor Detail |
|---|
public AbstractCacheableService()
| Method Detail |
|---|
public void initCache()
public void initCache(String strCacheName)
strCacheName - The cache name
public void putInCache(String strKey,
Object object)
strKey - The key of the object to put into the cacheobject - The object to put into the cachepublic Object getFromCache(String strKey)
strKey - The key of the object to retrieve from the cache
public boolean isCacheEnable()
isCacheEnable in interface CacheableServicepublic void enableCache(boolean bEnable)
enableCache in interface CacheableServicebEnable - true to enable, false to disablepublic void resetCache()
resetCache in interface CacheableServicepublic int getCacheSize()
getCacheSize in interface CacheableServicepublic net.sf.ehcache.Cache getCache()
public List<String> getKeys()
getKeys in interface CacheableServicepublic int getMaxElements()
getMaxElements in interface CacheableServicepublic long getTimeToLive()
getTimeToLive in interface CacheableServicepublic long getMemorySize()
getMemorySize in interface CacheableServicepublic String getInfos()
getInfos in interface CacheableServicepublic Object clone()
clone in interface net.sf.ehcache.event.CacheEventListenerclone in class ObjectObject.clone()
public void notifyElementExpired(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
notifyElementExpired in interface net.sf.ehcache.event.CacheEventListener
public void notifyElementRemoved(net.sf.ehcache.Ehcache ehch,
net.sf.ehcache.Element elmnt)
throws net.sf.ehcache.CacheException
notifyElementRemoved in interface net.sf.ehcache.event.CacheEventListenernet.sf.ehcache.CacheException
public void notifyElementEvicted(net.sf.ehcache.Ehcache ehch,
net.sf.ehcache.Element elmnt)
notifyElementEvicted in interface net.sf.ehcache.event.CacheEventListenerpublic void notifyRemoveAll(net.sf.ehcache.Ehcache ehch)
notifyRemoveAll in interface net.sf.ehcache.event.CacheEventListener
public void notifyElementPut(net.sf.ehcache.Ehcache ehch,
net.sf.ehcache.Element elmnt)
throws net.sf.ehcache.CacheException
notifyElementPut in interface net.sf.ehcache.event.CacheEventListenernet.sf.ehcache.CacheException
public void notifyElementUpdated(net.sf.ehcache.Ehcache ehch,
net.sf.ehcache.Element elmnt)
throws net.sf.ehcache.CacheException
notifyElementUpdated in interface net.sf.ehcache.event.CacheEventListenernet.sf.ehcache.CacheExceptionpublic void dispose()
dispose in interface net.sf.ehcache.event.CacheEventListenerpublic void removeKey(String strKey)
strKey - The key to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||