|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.monitor.CmsMemoryMonitor
public class CmsMemoryMonitor
Monitors OpenCms memory consumption.
The memory monitor also provides all kind of caches used in the OpenCms core.
Nested Class Summary | |
---|---|
static class |
CmsMemoryMonitor.CacheType
Cache types. |
Constructor Summary | |
---|---|
CmsMemoryMonitor()
Empty constructor, required by OpenCms scheduler. |
Method Summary | |
---|---|
void |
cacheACL(java.lang.String key,
CmsAccessControlList acl)
Caches the given acl under the given cache key. |
void |
cacheContentDefinition(java.lang.String key,
CmsXmlContentDefinition contentDefinition)
Caches the given content definition under the given cache key. |
void |
cacheGroup(CmsGroup group)
Caches the given group under its id AND fully qualified name. |
void |
cacheLocale(java.lang.String key,
java.util.Locale locale)
Caches the given locale under the given cache key. |
void |
cacheLock(CmsLock lock)
Caches the given lock. |
void |
cacheMemObject(java.lang.String key,
java.lang.Object obj)
Caches the given object under the given cache key. |
void |
cacheOrgUnit(CmsOrganizationalUnit orgUnit)
Caches the given organizational under its id AND the fully qualified name. |
void |
cachePermission(java.lang.String key,
I_CmsPermissionHandler.CmsPermissionCheckResult permission)
Caches the given permission check result under the given cache key. |
void |
cacheProject(CmsProject project)
Caches the given project under its id AND the fully qualified name. |
void |
cacheProjectResources(java.lang.String key,
java.util.List<CmsResource> projectResources)
Caches the given project resource list under the given cache key. |
void |
cacheProperty(java.lang.String key,
CmsProperty property)
Caches the given property under the given cache key. |
void |
cachePropertyList(java.lang.String key,
java.util.List<CmsProperty> propertyList)
Caches the given property list under the given cache key. |
void |
cachePublishedResources(java.lang.String cacheKey,
java.util.List<CmsPublishedResource> publishedResources)
Caches the given published resources list under the given cache key. |
void |
cachePublishJob(CmsPublishJobInfoBean publishJob)
Caches the given publish job. |
void |
cachePublishJobInHistory(CmsPublishJobInfoBean publishJob)
Caches the given publish job in the publish job history. |
void |
cacheResource(java.lang.String key,
CmsResource resource)
Caches the given resource under the given cache key. |
void |
cacheResourceList(java.lang.String key,
java.util.List<CmsResource> resourceList)
Caches the given resource list under the given cache key. |
void |
cacheRole(java.lang.String key,
boolean hasRole)
Caches the given value under the given cache key. |
void |
cacheRoleList(java.lang.String key,
java.util.List<CmsRole> roles)
Caches the given value under the given cache key. |
void |
cacheUser(CmsUser user)
Caches the given user under its id AND the fully qualified name. |
void |
cacheUserGroups(java.lang.String key,
java.util.List<CmsGroup> userGroups)
Caches the given list of user groups under the given cache key. |
void |
cacheVfsObject(java.lang.String key,
java.lang.Object obj)
Caches the given vfs object under the given cache key. |
void |
cacheXmlPermanentEntity(java.lang.String systemId,
byte[] content)
Caches the given xml entity under the given system id. |
void |
cacheXmlTemporaryEntity(java.lang.String key,
byte[] content)
Caches the given xml entity under the given cache key. |
void |
clearAccessControlListCache()
Clears the access control list cache when access control entries are changed. |
void |
clearCache()
Clears almost all internal caches. |
protected void |
clearCaches()
Clears the OpenCms caches. |
void |
clearPrincipalsCache()
Clears all internal principal-related caches. |
void |
clearResourceCache()
Clears all the depending caches when a resource was changed. |
void |
clearUserCache(CmsUser user)
Clears the user cache for the given user. |
void |
disableCache(CmsMemoryMonitor.CacheType... types)
Disables the given cache. |
void |
enableCache(CmsMemoryMonitor.CacheType... types)
Enables the given cache. |
boolean |
enabled()
Returns if monitoring is enabled. |
void |
flushACLs()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushCache(CmsMemoryMonitor.CacheType... types)
Flushes the given cache. |
void |
flushContentDefinitions()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushGroups()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushLocales()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushLocks(java.util.Map<java.lang.String,CmsLock> newLocks)
Flushes the locks cache. |
void |
flushMemObjects()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushOrgUnits()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushPermissions()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushProjectResources()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushProjects()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushProperties()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushPropertyLists()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushPublishedResources()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushPublishJobHistory()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushPublishJobs()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushResourceLists()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushResources()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushRoleLists()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushRoles()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushUserGroups()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushUsers()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushVfsObjects()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushXmlPermanentEntities()
Deprecated. use flushCache(CacheType[]) instead |
void |
flushXmlTemporaryEntities()
Deprecated. use flushCache(CacheType[]) instead |
java.util.List<java.lang.String> |
getAllCachedLockPaths()
Returns all cached lock root paths. |
java.util.List<CmsLock> |
getAllCachedLocks()
Returns all cached locks. |
java.util.List<CmsPublishJobInfoBean> |
getAllCachedPublishJobs()
Returns all cached publish jobs in the queue as ordered list. |
java.util.List<CmsPublishJobInfoBean> |
getAllCachedPublishJobsInHistory()
Returns all cached publish jobs in the history as ordered list. |
CmsAccessControlList |
getCachedACL(java.lang.String key)
Returns the ACL cached with the given cache key or null if not found. |
CmsXmlContentDefinition |
getCachedContentDefinition(java.lang.String key)
Returns the xml content definition cached with the given cache key or null if not found. |
CmsGroup |
getCachedGroup(java.lang.String key)
Returns the group cached with the given cache key or null if not found. |
java.util.Locale |
getCachedLocale(java.lang.String key)
Returns the locale cached with the given cache key or null if not found. |
CmsLock |
getCachedLock(java.lang.String rootPath)
Returns the lock cached with the given root path or null if not found. |
java.lang.Object |
getCachedMemObject(java.lang.String key)
Returns the memory object cached with the given cache key or null if not found. |
CmsOrganizationalUnit |
getCachedOrgUnit(java.lang.String key)
Returns the organizational unit cached with the given cache key or null if not found. |
I_CmsPermissionHandler.CmsPermissionCheckResult |
getCachedPermission(java.lang.String key)
Returns the permission check result cached with the given cache key or null if not found. |
CmsProject |
getCachedProject(java.lang.String key)
Returns the project cached with the given cache key or null if not found. |
java.util.List<CmsResource> |
getCachedProjectResources(java.lang.String key)
Returns the project resources list cached with the given cache key or null if not found. |
CmsProperty |
getCachedProperty(java.lang.String key)
Returns the property cached with the given cache key or null if not found. |
java.util.List<CmsProperty> |
getCachedPropertyList(java.lang.String key)
Returns the property list cached with the given cache key or null if not found. |
java.util.List<CmsPublishedResource> |
getCachedPublishedResources(java.lang.String cacheKey)
Returns the published resources list cached with the given cache key or null if not found. |
CmsPublishJobInfoBean |
getCachedPublishJob(java.lang.String key)
Returns the publish job with the given cache key or null if not found. |
CmsPublishJobInfoBean |
getCachedPublishJobInHistory(java.lang.String key)
Returns the publish job from the history with the given cache key or null if not found. |
CmsResource |
getCachedResource(java.lang.String key)
Returns the resource cached with the given cache key or null if not found. |
java.util.List<CmsResource> |
getCachedResourceList(java.lang.String key)
Returns the resource list cached with the given cache key or null if not found. |
java.lang.Boolean |
getCachedRole(java.lang.String key)
Returns the value cached with the given cache key or null if not found. |
java.util.List<CmsRole> |
getCachedRoleList(java.lang.String key)
Returns the value cached with the given cache key or null if not found. |
CmsUser |
getCachedUser(java.lang.String key)
Returns the user cached with the given cache key or null if not found. |
java.util.List<CmsGroup> |
getCachedUserGroups(java.lang.String key)
Returns the user groups list cached with the given cache key or null if not found. |
java.lang.Object |
getCachedVfsObject(java.lang.String key)
Returns the vfs object cached with the given cache key or null if not found. |
byte[] |
getCachedXmlPermanentEntity(java.lang.String systemId)
Returns the xml permanent entity content cached with the given systemId or null if not found. |
byte[] |
getCachedXmlTemporaryEntity(java.lang.String key)
Returns the xml temporary entity content cached with the given cache key or null if not found. |
CmsMemoryMonitorConfiguration |
getConfiguration()
Returns the configuration. |
protected long |
getCosts(java.lang.Object obj)
Returns the cache costs of a monitored object. |
CmsPublishJobInfoBean |
getFirstCachedPublishJob()
Returns the next publish job from the publish job queue. |
protected java.lang.String |
getItems(java.lang.Object obj)
Returns the number of items within a monitored object. |
protected long |
getKeySize(java.util.Map<?,?> map,
int depth)
Returns the total size of key strings within a monitored map. |
protected long |
getKeySize(java.lang.Object obj)
Returns the total size of key strings within a monitored object. |
protected java.lang.String |
getLimit(java.lang.Object obj)
Returns the max costs for all items within a monitored object. |
int |
getLogCount()
Returns the log count. |
static int |
getMemorySize(java.lang.Object obj)
Returns the size of objects that are instances of byte[] , String , CmsFile ,I_CmsLruCacheObject . |
static long |
getValueSize(java.util.List<?> listValue,
int depth)
Returns the total value size of a list object. |
static long |
getValueSize(java.util.Map<?,?> mapValue,
int depth)
Returns the total value size of a map object. |
static long |
getValueSize(java.lang.Object obj)
Returns the value sizes of value objects within the monitored object. |
void |
initialize(CmsSystemConfiguration configuration)
Initializes the monitor with the provided configuration. |
boolean |
isCacheProperty()
Deprecated. use isEnabled(CacheType) instead |
boolean |
isCachePropertyList()
Deprecated. use isEnabled(CacheType) instead |
boolean |
isCacheResource()
Deprecated. use isEnabled(CacheType) instead |
boolean |
isCacheResourceList()
Deprecated. use isEnabled(CacheType) instead |
boolean |
isEnabled(CmsMemoryMonitor.CacheType type)
Checks if the given cache is enabled. |
boolean |
isMonitoring(java.lang.String key)
Checks if there is a registered monitored object with the given key. |
java.lang.String |
launch(CmsObject cms,
java.util.Map parameters)
This method will be called when this scheduled job is executed. |
boolean |
lowMemory()
Returns true if the system runs low on memory. |
protected void |
monitorSendEmail(boolean warning)
Sends a warning or status email with OpenCms Memory information. |
protected void |
monitorWriteLog(boolean warning)
Write a warning or status log entry with OpenCms Memory information. |
void |
register(java.lang.String objectName,
java.lang.Object object)
Adds a new object to the monitor. |
boolean |
requiresPersistency()
Checks if some kind of persistence is required. |
void |
setCacheProperty(boolean cacheProperty)
Deprecated. use enableCache(CacheType[]) or disableCache(CacheType[]) instead |
void |
setCachePropertyList(boolean cachePropertyList)
Deprecated. use enableCache(CacheType[]) or disableCache(CacheType[]) instead |
void |
setCacheResource(boolean cacheResource)
Deprecated. use enableCache(CacheType[]) or disableCache(CacheType[]) instead |
void |
setCacheResourceList(boolean cacheResourceList)
Deprecated. use enableCache(CacheType[]) or disableCache(CacheType[]) instead |
void |
shutdown()
Flushes all cached objects. |
void |
uncacheContentDefinition(java.lang.String key)
Removes the given xml content definition from the cache. |
void |
uncacheGroup(CmsGroup group)
Removes the given group from the cache. |
void |
uncacheLock(java.lang.String rootPath)
Removes the cached lock for the given root path from the cache. |
void |
uncacheOrgUnit(CmsOrganizationalUnit orgUnit)
Removes the given organizational unit from the cache. |
void |
uncacheProject(CmsProject project)
Removes the given project from the cache. |
void |
uncachePublishJob(CmsPublishJobInfoBean publishJob)
Removes the given publish job from the cache. |
void |
uncachePublishJobInHistory(CmsPublishJobInfoBean publishJob)
Removes the given publish job from the history. |
void |
uncacheUser(CmsUser user)
Removes the given user from the cache. |
void |
uncacheVfsObject(java.lang.String key)
Removes the given vfs object from the cache. |
void |
uncacheXmlTemporaryEntity(java.lang.String key)
Removes the given xml temporary entity from the cache. |
protected void |
updateStatus()
Updates the memory information of the memory monitor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsMemoryMonitor()
Method Detail |
---|
public static int getMemorySize(java.lang.Object obj)
byte[]
, String
, CmsFile
,I_CmsLruCacheObject
.For other objects, a size of 0 is returned.
obj
- the object
public static long getValueSize(java.util.List<?> listValue, int depth)
listValue
- the list objectdepth
- the max recursion depth for calculation the size
public static long getValueSize(java.util.Map<?,?> mapValue, int depth)
mapValue
- the map objectdepth
- the max recursion depth for calculation the size
public static long getValueSize(java.lang.Object obj)
obj
- the object
public void cacheACL(java.lang.String key, CmsAccessControlList acl)
key
- the cache keyacl
- the acl to cachepublic void cacheContentDefinition(java.lang.String key, CmsXmlContentDefinition contentDefinition)
key
- the cache keycontentDefinition
- the content definition to cachepublic void cacheGroup(CmsGroup group)
group
- the group to cachepublic void cacheLocale(java.lang.String key, java.util.Locale locale)
key
- the cache keylocale
- the locale to cachepublic void cacheLock(CmsLock lock)
The lock is cached by it resource's root path.
lock
- the lock to cachepublic void cacheMemObject(java.lang.String key, java.lang.Object obj)
key
- the cache keyobj
- the object to cachepublic void cacheOrgUnit(CmsOrganizationalUnit orgUnit)
orgUnit
- the organizational unit to cachepublic void cachePermission(java.lang.String key, I_CmsPermissionHandler.CmsPermissionCheckResult permission)
key
- the cache keypermission
- the permission check result to cachepublic void cacheProject(CmsProject project)
project
- the project to cachepublic void cacheProjectResources(java.lang.String key, java.util.List<CmsResource> projectResources)
key
- the cache keyprojectResources
- the project resources to cachepublic void cacheProperty(java.lang.String key, CmsProperty property)
key
- the cache keyproperty
- the property to cachepublic void cachePropertyList(java.lang.String key, java.util.List<CmsProperty> propertyList)
key
- the cache keypropertyList
- the property list to cachepublic void cachePublishedResources(java.lang.String cacheKey, java.util.List<CmsPublishedResource> publishedResources)
cacheKey
- the cache keypublishedResources
- the published resources list to cachepublic void cachePublishJob(CmsPublishJobInfoBean publishJob)
publishJob
- the publish jobpublic void cachePublishJobInHistory(CmsPublishJobInfoBean publishJob)
publishJob
- the publish jobpublic void cacheResource(java.lang.String key, CmsResource resource)
key
- the cache keyresource
- the resource to cachepublic void cacheResourceList(java.lang.String key, java.util.List<CmsResource> resourceList)
key
- the cache keyresourceList
- the resource list to cachepublic void cacheRole(java.lang.String key, boolean hasRole)
key
- the cache keyhasRole
- if the user has the given rolepublic void cacheRoleList(java.lang.String key, java.util.List<CmsRole> roles)
key
- the cache keyroles
- the roles of the userpublic void cacheUser(CmsUser user)
user
- the user to cachepublic void cacheUserGroups(java.lang.String key, java.util.List<CmsGroup> userGroups)
key
- the cache keyuserGroups
- the list of user groups to cachepublic void cacheVfsObject(java.lang.String key, java.lang.Object obj)
key
- the cache keyobj
- the vfs object to cachepublic void cacheXmlPermanentEntity(java.lang.String systemId, byte[] content)
systemId
- the cache keycontent
- the content to cachepublic void cacheXmlTemporaryEntity(java.lang.String key, byte[] content)
key
- the cache keycontent
- the content to cachepublic void clearAccessControlListCache()
public void clearCache()
public void clearPrincipalsCache()
public void clearResourceCache()
public void clearUserCache(CmsUser user)
user
- the userpublic void disableCache(CmsMemoryMonitor.CacheType... types)
types
- the cache type to disablepublic void enableCache(CmsMemoryMonitor.CacheType... types)
types
- the cache type to disablepublic boolean enabled()
public void flushACLs()
flushCache(CacheType[])
instead
public void flushCache(CmsMemoryMonitor.CacheType... types)
types
- the cache types to flush@Deprecated public void flushContentDefinitions()
flushCache(CacheType[])
instead
@Deprecated public void flushGroups()
flushCache(CacheType[])
instead
@Deprecated public void flushLocales()
flushCache(CacheType[])
instead
public void flushLocks(java.util.Map<java.lang.String,CmsLock> newLocks)
newLocks
- if not null
the lock cache is replaced by the given map@Deprecated public void flushMemObjects()
flushCache(CacheType[])
instead
@Deprecated public void flushOrgUnits()
flushCache(CacheType[])
instead
@Deprecated public void flushPermissions()
flushCache(CacheType[])
instead
@Deprecated public void flushProjectResources()
flushCache(CacheType[])
instead
@Deprecated public void flushProjects()
flushCache(CacheType[])
instead
@Deprecated public void flushProperties()
flushCache(CacheType[])
instead
@Deprecated public void flushPropertyLists()
flushCache(CacheType[])
instead
@Deprecated public void flushPublishedResources()
flushCache(CacheType[])
instead
@Deprecated public void flushPublishJobHistory()
flushCache(CacheType[])
instead
@Deprecated public void flushPublishJobs()
flushCache(CacheType[])
instead
@Deprecated public void flushResourceLists()
flushCache(CacheType[])
instead
@Deprecated public void flushResources()
flushCache(CacheType[])
instead
@Deprecated public void flushRoleLists()
flushCache(CacheType[])
instead
@Deprecated public void flushRoles()
flushCache(CacheType[])
instead
@Deprecated public void flushUserGroups()
flushCache(CacheType[])
instead
@Deprecated public void flushUsers()
flushCache(CacheType[])
instead
@Deprecated public void flushVfsObjects()
flushCache(CacheType[])
instead
@Deprecated public void flushXmlPermanentEntities()
flushCache(CacheType[])
instead
@Deprecated public void flushXmlTemporaryEntities()
flushCache(CacheType[])
instead
public java.util.List<java.lang.String> getAllCachedLockPaths()
String
objectspublic java.util.List<CmsLock> getAllCachedLocks()
CmsLock
objectspublic java.util.List<CmsPublishJobInfoBean> getAllCachedPublishJobs()
public java.util.List<CmsPublishJobInfoBean> getAllCachedPublishJobsInHistory()
public CmsAccessControlList getCachedACL(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsXmlContentDefinition getCachedContentDefinition(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsGroup getCachedGroup(java.lang.String key)
null
if not found.
key
- the cache key to look for, this may be the group's uuid or the fqn
public java.util.Locale getCachedLocale(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsLock getCachedLock(java.lang.String rootPath)
null
if not found.
rootPath
- the root path to look for
public java.lang.Object getCachedMemObject(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsOrganizationalUnit getCachedOrgUnit(java.lang.String key)
null
if not found.
key
- the cache key to look for, this may be the organizational unit's uuid or the fqn
public I_CmsPermissionHandler.CmsPermissionCheckResult getCachedPermission(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsProject getCachedProject(java.lang.String key)
null
if not found.
key
- the cache key to look for, this may be the project's uuid or the fqn
public java.util.List<CmsResource> getCachedProjectResources(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsProperty getCachedProperty(java.lang.String key)
null
if not found.
key
- the cache key to look for
public java.util.List<CmsProperty> getCachedPropertyList(java.lang.String key)
null
if not found.
key
- the cache key to look for
public java.util.List<CmsPublishedResource> getCachedPublishedResources(java.lang.String cacheKey)
null
if not found.
cacheKey
- the cache key to look for
public CmsPublishJobInfoBean getCachedPublishJob(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsPublishJobInfoBean getCachedPublishJobInHistory(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsResource getCachedResource(java.lang.String key)
null
if not found.
key
- the cache key to look for
public java.util.List<CmsResource> getCachedResourceList(java.lang.String key)
null
if not found.
key
- the cache key to look for
public java.lang.Boolean getCachedRole(java.lang.String key)
null
if not found.
key
- the cache key to look for
public java.util.List<CmsRole> getCachedRoleList(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsUser getCachedUser(java.lang.String key)
null
if not found.
key
- the cache key to look for, this may be the user's uuid or the fqn
public java.util.List<CmsGroup> getCachedUserGroups(java.lang.String key)
null
if not found.
key
- the cache key to look for
public java.lang.Object getCachedVfsObject(java.lang.String key)
null
if not found.
key
- the cache key to look for
public byte[] getCachedXmlPermanentEntity(java.lang.String systemId)
null
if not found.
systemId
- the cache key to look for
public byte[] getCachedXmlTemporaryEntity(java.lang.String key)
null
if not found.
key
- the cache key to look for
public CmsMemoryMonitorConfiguration getConfiguration()
public CmsPublishJobInfoBean getFirstCachedPublishJob()
public int getLogCount()
public void initialize(CmsSystemConfiguration configuration)
configuration
- the configuration to use@Deprecated public boolean isCacheProperty()
isEnabled(CacheType)
instead
true
if the property cache is enabled@Deprecated public boolean isCachePropertyList()
isEnabled(CacheType)
instead
true
if the property list cache is enabled@Deprecated public boolean isCacheResource()
isEnabled(CacheType)
instead
true
if the resource cache is enabled@Deprecated public boolean isCacheResourceList()
isEnabled(CacheType)
instead
true
if the resource list cache is enabledpublic boolean isEnabled(CmsMemoryMonitor.CacheType type)
type
- the cache type to check
true
if the given cache is enabledpublic boolean isMonitoring(java.lang.String key)
key
- the key to look for
true
if there is a registered monitored object with the given keypublic java.lang.String launch(CmsObject cms, java.util.Map parameters) throws java.lang.Exception
I_CmsScheduledJob
Depending on the configuration of this job, a new instance of the configured class will be instantiated every time the job is launched, or a new instance will be generated only the first time the job is launched, and re-used afterwards.
The result String will be written to the OpenCms logfile in the
org.opencms.scheduler.CmsScheduleManager
channel,
on INFO
log level.
launch
in interface I_CmsScheduledJob
cms
- will be initialized with the configured users cms contextparameters
- the configured parameters
java.lang.Exception
- if something goes wrongI_CmsScheduledJob.launch(CmsObject, Map)
public boolean lowMemory()
public void register(java.lang.String objectName, java.lang.Object object)
objectName
- name of the objectobject
- the object for monitoringpublic boolean requiresPersistency()
This could be overwritten in a distributed environment.
true
if some kind of persistence is required@Deprecated public void setCacheProperty(boolean cacheProperty)
enableCache(CacheType[])
or disableCache(CacheType[])
instead
cacheProperty
- if the property cache is enabled@Deprecated public void setCachePropertyList(boolean cachePropertyList)
enableCache(CacheType[])
or disableCache(CacheType[])
instead
cachePropertyList
- if the property list cache is enabled@Deprecated public void setCacheResource(boolean cacheResource)
enableCache(CacheType[])
or disableCache(CacheType[])
instead
cacheResource
- if the resource cache is enabled@Deprecated public void setCacheResourceList(boolean cacheResourceList)
enableCache(CacheType[])
or disableCache(CacheType[])
instead
cacheResourceList
- if the resource list cache is enabledpublic void shutdown() throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic void uncacheContentDefinition(java.lang.String key)
key
- the cache key to remove from cachepublic void uncacheGroup(CmsGroup group)
The group is removed by name AND also by uuid.
group
- the group to remove from cachepublic void uncacheLock(java.lang.String rootPath)
rootPath
- the root path of the lock to remove from cachepublic void uncacheOrgUnit(CmsOrganizationalUnit orgUnit)
The organizational unit is removed by name AND also by uuid.
orgUnit
- the organizational unit to remove from cachepublic void uncacheProject(CmsProject project)
The project is removed by name AND also by uuid.
project
- the project to remove from cachepublic void uncachePublishJob(CmsPublishJobInfoBean publishJob)
publishJob
- the publish job to removepublic void uncachePublishJobInHistory(CmsPublishJobInfoBean publishJob)
publishJob
- the publish job to removepublic void uncacheUser(CmsUser user)
The user is removed by name AND also by uuid.
user
- the user to remove from cachepublic void uncacheVfsObject(java.lang.String key)
key
- the cache key to remove from cachepublic void uncacheXmlTemporaryEntity(java.lang.String key)
key
- the cache key to remove from cacheprotected void clearCaches()
protected long getCosts(java.lang.Object obj)
obj
must be of type CmsLruCache
.
obj
- the object
protected java.lang.String getItems(java.lang.Object obj)
obj
must be of type CmsLruCache
or Map
.
obj
- the object
protected long getKeySize(java.util.Map<?,?> map, int depth)
The keys must be of type String
.
map
- the mapdepth
- the max recursion depth for calculation the size
protected long getKeySize(java.lang.Object obj)
obj
must be of type Map
, the keys must be of type String
.
obj
- the object
protected java.lang.String getLimit(java.lang.Object obj)
obj
must be of type CmsLruCache
or LRUMap
.
obj
- the object
protected void monitorSendEmail(boolean warning)
warning
- if true, send a memory warning emailprotected void monitorWriteLog(boolean warning)
warning
- if true, write a memory warning log entryprotected void updateStatus()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |