|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.cache.CmsMemoryObjectCache
public final class CmsMemoryObjectCache
A singleton memory cache, that stores objects related with keys.
This cache listens to the I_CmsEventListener.EVENT_CLEAR_CACHES
event only.
Field Summary |
---|
Method Summary | |
---|---|
void |
cmsEvent(CmsEvent event)
Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class. |
java.lang.Object |
getCachedObject(java.lang.Class owner,
java.lang.String key)
Returns an object from the cache. |
static CmsMemoryObjectCache |
getInstance()
Returns the singelton memory Object cache instance. |
void |
putCachedObject(java.lang.Class owner,
java.lang.String key,
java.lang.Object value)
Puts an object into the cache. |
protected void |
registerEventListener()
Registers all required event listeners. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CmsMemoryObjectCache getInstance()
public void cmsEvent(CmsEvent event)
I_CmsEventListener
cmsEvent
in interface I_CmsEventListener
event
- CmsEvent that has occurredI_CmsEventListener.cmsEvent(org.opencms.main.CmsEvent)
public java.lang.Object getCachedObject(java.lang.Class owner, java.lang.String key)
owner
- the owner class of the cached object (used to ensure keys don't overlapp)key
- the key to lookup the object for
null
if no object matches the given keypublic void putCachedObject(java.lang.Class owner, java.lang.String key, java.lang.Object value)
owner
- the owner class of the cached object (used to ensure keys don't overlapp)key
- the key to store the object atvalue
- the object to storeprotected void registerEventListener()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |