public final class CmsADECache extends CmsVfsCache
EVENT_BEFORE_PUBLISH_PROJECT, EVENT_CLEAR_CACHES, EVENT_CLEAR_OFFLINE_CACHES, EVENT_CLEAR_ONLINE_CACHES, EVENT_CLEAR_PRINCIPAL_CACHES, EVENT_FLEX_CACHE_CLEAR, EVENT_FLEX_PURGE_JSP_REPOSITORY, EVENT_FULLSTATIC_EXPORT, EVENT_GROUP_MODIFIED, EVENT_LOGIN_USER, EVENT_OU_MODIFIED, EVENT_PROJECT_MODIFIED, EVENT_PROPERTY_DEFINITION_CREATED, EVENT_PROPERTY_DEFINITION_MODIFIED, EVENT_PROPERTY_MODIFIED, EVENT_PUBLISH_PROJECT, EVENT_REBUILD_SEARCHINDEXES, EVENT_RESOURCE_AND_PROPERTIES_MODIFIED, EVENT_RESOURCE_COPIED, EVENT_RESOURCE_CREATED, EVENT_RESOURCE_DELETED, EVENT_RESOURCE_MODIFIED, EVENT_RESOURCE_MOVED, EVENT_RESOURCES_AND_PROPERTIES_MODIFIED, EVENT_RESOURCES_MODIFIED, EVENT_SITEMAP_CHANGED, EVENT_UPDATE_EXPORTS, EVENT_USER_MODIFIED, KEY_CHANGE, KEY_DBCONTEXT, KEY_GROUP_ID, KEY_GROUP_NAME, KEY_INDEX_NAMES, KEY_OU_ID, KEY_OU_NAME, KEY_PROJECTID, KEY_PUBLISHID, KEY_PUBLISHLIST, KEY_REPORT, KEY_RESOURCE, KEY_RESOURCES, KEY_SKIPINDEX, KEY_USER_ACTION, KEY_USER_CHANGES, KEY_USER_ID, KEY_USER_NAME, LISTENERS_FOR_ALL_EVENTS, VALUE_GROUP_MODIFIED_ACTION_CREATE, VALUE_GROUP_MODIFIED_ACTION_DELETE, VALUE_GROUP_MODIFIED_ACTION_WRITE, VALUE_OU_MODIFIED_ACTION_CREATE, VALUE_OU_MODIFIED_ACTION_DELETE, VALUE_USER_MODIFIED_ACTION_ADD_USER_TO_GROUP, VALUE_USER_MODIFIED_ACTION_CREATE_USER, VALUE_USER_MODIFIED_ACTION_DELETE_USER, VALUE_USER_MODIFIED_ACTION_REMOVE_USER_FROM_GROUP, VALUE_USER_MODIFIED_ACTION_RESET_PASSWORD, VALUE_USER_MODIFIED_ACTION_SET_OU, VALUE_USER_MODIFIED_ACTION_WRITE_USER
Constructor and Description |
---|
CmsADECache(CmsMemoryMonitor memMonitor,
CmsADECacheSettings cacheSettings)
Initializes the cache.
|
Modifier and Type | Method and Description |
---|---|
protected void |
flush(boolean online)
Flushes the caches.
|
void |
flushContainerPages(boolean online)
Flushes the container pages cache.
|
void |
flushGroupContainers(boolean online)
Flushes the group containers cache.
|
CmsXmlContainerPage |
getCacheContainerPage(java.lang.String key,
boolean online)
Returns the cached container page under the given key and for the given project.
|
CmsXmlGroupContainer |
getCacheGroupContainer(java.lang.String key,
boolean online)
Returns the cached group container under the given key and for the given project.
|
java.lang.String |
getCacheKey(CmsUUID structureId,
boolean keepEncoding)
Returns the cache key for the given parameters.
|
void |
setCacheContainerPage(java.lang.String key,
CmsXmlContainerPage containerPage,
boolean online)
Caches the given container page under the given key and for the given project.
|
void |
setCacheGroupContainer(java.lang.String key,
CmsXmlGroupContainer groupContainer,
boolean online)
Caches the given group container under the given key and for the given project.
|
void |
uncacheContainerPage(CmsUUID structureId,
boolean online)
Removes the container page identified by its structure id from the cache.
|
void |
uncacheGroupContainer(CmsUUID structureId,
boolean online)
Removes the group container identified by its structure id from the cache.
|
protected void |
uncacheResource(CmsResource resource)
Removes a cached resource from the cache.
|
cmsEvent, registerEventListener, shutdown, uncacheResources
public CmsADECache(CmsMemoryMonitor memMonitor, CmsADECacheSettings cacheSettings)
memMonitor
- the memory monitor instancecacheSettings
- the system cache settingsOpenCmsCore.initConfiguration(org.opencms.configuration.CmsParameterConfiguration)
public void flushContainerPages(boolean online)
online
- if to flush the online or offline cachepublic void flushGroupContainers(boolean online)
online
- if to flush the online or offline cachepublic CmsXmlContainerPage getCacheContainerPage(java.lang.String key, boolean online)
key
- the cache keyonline
- if cached in online or offline projectnull
if not foundpublic CmsXmlGroupContainer getCacheGroupContainer(java.lang.String key, boolean online)
key
- the cache keyonline
- if cached in online or offline projectnull
if not foundpublic java.lang.String getCacheKey(CmsUUID structureId, boolean keepEncoding)
structureId
- the container page's structure idkeepEncoding
- if to keep the encoding while unmarshallingpublic void setCacheContainerPage(java.lang.String key, CmsXmlContainerPage containerPage, boolean online)
key
- the cache keycontainerPage
- the object to cacheonline
- if to cache in online or offline projectpublic void setCacheGroupContainer(java.lang.String key, CmsXmlGroupContainer groupContainer, boolean online)
key
- the cache keygroupContainer
- the object to cacheonline
- if to cache in online or offline projectpublic void uncacheContainerPage(CmsUUID structureId, boolean online)
structureId
- the container page's structure idonline
- if online or offlinepublic void uncacheGroupContainer(CmsUUID structureId, boolean online)
structureId
- the group container's structure idonline
- if online or offlineprotected 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)