|
||||||||||
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 | |
---|---|
java.lang.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. |
java.lang.Object |
getFromCache(java.lang.String strKey)
Gets an object from the cache |
java.lang.String |
getInfos()
Returns cache infos |
java.util.List<java.lang.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(java.lang.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(java.lang.String strKey,
java.lang.Object object)
Put an object into 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(java.lang.String strCacheName)
strCacheName
- The cache namepublic void putInCache(java.lang.String strKey, java.lang.Object object)
strKey
- The key of the object to put into the cacheobject
- The object to put into the cachepublic java.lang.Object getFromCache(java.lang.String strKey)
strKey
- The key of the object to retrieve from the cache
public boolean isCacheEnable()
isCacheEnable
in interface CacheableService
public void enableCache(boolean bEnable)
enableCache
in interface CacheableService
bEnable
- true to enable, false to disablepublic void resetCache()
resetCache
in interface CacheableService
public int getCacheSize()
getCacheSize
in interface CacheableService
public net.sf.ehcache.Cache getCache()
public java.util.List<java.lang.String> getKeys()
getKeys
in interface CacheableService
public int getMaxElements()
getMaxElements
in interface CacheableService
public long getTimeToLive()
getTimeToLive
in interface CacheableService
public long getMemorySize()
getMemorySize
in interface CacheableService
public java.lang.String getInfos()
getInfos
in interface CacheableService
public java.lang.Object clone()
clone
in interface net.sf.ehcache.event.CacheEventListener
clone
in class java.lang.Object
Object.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.CacheEventListener
net.sf.ehcache.CacheException
public void notifyElementEvicted(net.sf.ehcache.Ehcache ehch, net.sf.ehcache.Element elmnt)
notifyElementEvicted
in interface net.sf.ehcache.event.CacheEventListener
public 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.CacheEventListener
net.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.CacheEventListener
net.sf.ehcache.CacheException
public void dispose()
dispose
in interface net.sf.ehcache.event.CacheEventListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |