|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.cache.CmsVfsCache
org.opencms.cache.CmsVfsMemoryObjectCache
public class CmsVfsMemoryObjectCache
Implements a memory cache, that stores objects related to VFS files, providing a cache for the "online" and another for the "offline" project.
Field Summary |
---|
Constructor Summary | |
---|---|
CmsVfsMemoryObjectCache()
Constructor, creates a new CmsVfsMemoryObjectCache. |
Method Summary | |
---|---|
protected void |
flush(boolean online)
Flushes the caches. |
java.lang.Object |
getCachedObject(CmsObject cms,
java.lang.String rootPath)
Return an object from the cache. |
static CmsVfsMemoryObjectCache |
getVfsMemoryObjectCache()
Returns the VFS memory Object cache. |
java.lang.Object |
loadVfsObject(CmsObject cms,
java.lang.String rootPath,
org.apache.commons.collections.Transformer function)
Uses a transformer for loading an object from a path if it has not already been cached, and then caches it. |
void |
putCachedObject(CmsObject cms,
java.lang.String rootPath,
java.lang.Object value)
Puts an object into the cache. |
protected void |
uncacheResource(CmsResource resource)
Removes a cached resource from the cache. |
Methods inherited from class org.opencms.cache.CmsVfsCache |
---|
cmsEvent, registerEventListener, shutdown, uncacheResources |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsVfsMemoryObjectCache()
Method Detail |
---|
public static CmsVfsMemoryObjectCache getVfsMemoryObjectCache()
public java.lang.Object getCachedObject(CmsObject cms, java.lang.String rootPath)
cms
- the current users OpenCms contextrootPath
- the rootPath of the VFS resource to get the object for
public java.lang.Object loadVfsObject(CmsObject cms, java.lang.String rootPath, org.apache.commons.collections.Transformer function)
cms
- the CMS contextrootPath
- the root path from which the object should be loadedfunction
- the function which should load the object from VFS if it isn't already cached
public void putCachedObject(CmsObject cms, java.lang.String rootPath, java.lang.Object value)
cms
- the CmsObjectrootPath
- the rootPath of the VFS resource to store the object forvalue
- the object to storeprotected void flush(boolean online)
CmsVfsCache
flush
in class CmsVfsCache
online
- if to flush the online or offline cachesCmsVfsCache.flush(boolean)
protected void uncacheResource(CmsResource resource)
CmsVfsCache
uncacheResource
in class CmsVfsCache
resource
- the resourceCmsVfsCache.uncacheResource(org.opencms.file.CmsResource)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |