⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmsmemorymonitor.java

📁 找了很久才找到到源代码
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
        m_orgUnitCache.put(orgUnit.getId().toString(), orgUnit);
        m_orgUnitCache.put(orgUnit.getName(), orgUnit);
    }

    /**
     * Caches the given permission check result under the given cache key.<p>
     * 
     * @param key the cache key
     * @param permission the permission check result to cache
     */
    public void cachePermission(String key, I_CmsPermissionHandler.CmsPermissionCheckResult permission) {

        m_permissionCache.put(key, permission);
    }

    /**
     * Caches the given project under its id AND the fully qualified name.<p>
     * 
     * @param project the project to cache
     */
    public void cacheProject(CmsProject project) {

        m_projectCache.put(project.getUuid().toString(), project);
        m_projectCache.put(project.getName(), project);
    }

    /**
     * Caches the given project resource list under the given cache key.<p>
     * 
     * @param key the cache key
     * @param projectResources the project resources to cache
     */
    public void cacheProjectResources(String key, List projectResources) {

        m_projectResourcesCache.put(key, projectResources);
    }

    /**
     * Caches the given property under the given cache key.<p>
     * 
     * @param key the cache key
     * @param property the property to cache
     */
    public void cacheProperty(String key, CmsProperty property) {

        m_propertyCache.put(key, property);
    }

    /**
     * Caches the given property list under the given cache key.<p>
     * 
     * @param key the cache key
     * @param propertyList the property list to cache
     */
    public void cachePropertyList(String key, List propertyList) {

        m_propertyListCache.put(key, propertyList);
    }

    /**
     * Caches the given publish job.<p>
     * 
     * @param publishJob the publish job
     */
    public void cachePublishJob(CmsPublishJobInfoBean publishJob) {

        m_publishQueue.add(publishJob);
    }

    /**
     * Caches the given publish job in the publish job history.<p>
     * 
     * @param publishJob the publish job
     */
    public void cachePublishJobInHistory(CmsPublishJobInfoBean publishJob) {

        m_publishHistory.add(publishJob);
    }

    /**
     * Caches the given resource under the given cache key.<p>
     * 
     * @param key the cache key
     * @param resource the resource to cache
     */
    public void cacheResource(String key, CmsResource resource) {

        m_resourceCache.put(key, resource);
    }

    /**
     * Caches the given resource list under the given cache key.<p>
     * 
     * @param key the cache key
     * @param resourceList the resource list to cache
     */
    public void cacheResourceList(String key, List resourceList) {

        m_resourceListCache.put(key, resourceList);
    }

    /**
     * Caches the given value under the given cache key.<p>
     * 
     * @param key the cache key
     * @param hasRole if the user has the given role
     */
    public void cacheRole(String key, boolean hasRole) {

        m_rolesCache.put(key, Boolean.valueOf(hasRole));
    }

    /**
     * Caches the given value under the given cache key.<p>
     * 
     * @param key the cache key
     * @param roles the roles of the user
     */
    public void cacheRoleList(String key, List roles) {

        m_roleListsCache.put(key, roles);
    }

    /**
     * Caches the given user under its id AND the fully qualified name.<p>
     * 
     * @param user the user to cache
     */
    public void cacheUser(CmsUser user) {

        m_userCache.put(user.getId().toString(), user);
        m_userCache.put(user.getName(), user);
    }

    /**
     * Caches the given list of user groups under the given cache key.<p>
     * 
     * @param key the cache key
     * @param userGroups the list of user groups to cache
     */
    public void cacheUserGroups(String key, List userGroups) {

        m_userGroupsCache.put(key, userGroups);
    }

    /**
     * Caches the given vfs object under the given cache key.<p>
     * 
     * @param key the cache key
     * @param obj the vfs object to cache
     */
    public void cacheVfsObject(String key, Object obj) {

        m_vfsObjectCache.put(key, obj);
    }

    /**
     * Caches the given xml entity under the given system id.<p>
     * 
     * @param systemId the cache key
     * @param content the content to cache
     */
    public void cacheXmlPermanentEntity(String systemId, byte[] content) {

        m_xmlPermanentEntityCache.put(systemId, content);
    }

    /**
     * Caches the given xml entity under the given cache key.<p>
     * 
     * @param key the cache key
     * @param content the content to cache
     */
    public void cacheXmlTemporaryEntity(String key, byte[] content) {

        m_xmlTemporaryEntityCache.put(key, content);
    }

    /**
     * Returns if monitoring is enabled.<p>
     * 
     * @return true if monitoring is enabled
     */
    public boolean enabled() {

        return true;
    }

    /**
     * Flushes the ACL cache.<p>
     */
    public void flushACLs() {

        m_accessControlListCache.clear();
    }

    /**
     * Flushes the xml content definitions cache.<p>
     */
    public void flushContentDefinitions() {

        m_contentDefinitionsCache.clear();
    }

    /**
     * Flushes the group cache.<p>
     */
    public void flushGroups() {

        m_groupCache.clear();
    }

    /**
     * Flushes the locale cache.<p>
     */
    public void flushLocales() {

        m_localeCache.clear();
    }

    /**
     * Flushes the locks cache.<p>
     * 
     * @param newLocks if not <code>null</code> the lock cache is replaced by the given map 
     */
    public void flushLocks(Map newLocks) {

        if ((newLocks == null) || newLocks.isEmpty()) {
            m_lockCache.clear();
            return;
        }
        // initialize new lock cache
        Map newLockCache = Collections.synchronizedMap(newLocks);
        // register it
        register(CmsLockManager.class.getName(), newLockCache);
        // save the old cache
        Map oldCache = m_lockCache;
        // replace the old by the new cache
        m_lockCache = newLockCache;
        // clean up the old cache
        oldCache.clear();
    }

    /**
     * Flushes the memory object cache.<p>
     */
    public void flushMemObjects() {

        m_memObjectCache.clear();
    }

    /**
     * Flushes the organizational unit cache.<p>
     */
    public void flushOrgUnits() {

        m_orgUnitCache.clear();
    }

    /**
     * Flushes the permission check result cache.<p>
     */
    public void flushPermissions() {

        m_permissionCache.clear();
    }

    /**
     * Flushes the project resources cache.<p>
     */
    public void flushProjectResources() {

        m_projectResourcesCache.clear();
    }

    /**
     * Flushes the project cache.<p>
     */
    public void flushProjects() {

        m_projectCache.clear();
    }

    /**
     * Flushes the property cache.<p>
     */
    public void flushProperties() {

        m_propertyCache.clear();
    }

    /**
     * Flushes the property list cache.<p>
     */
    public void flushPropertyLists() {

        m_propertyListCache.clear();
    }

    /**
     * Flushes the publish history.<p>
     */
    public void flushPublishJobHistory() {

        m_publishHistory.clear();
    }

    /**
     * Flushes the publish queue.<p>
     */
    public void flushPublishJobs() {

        m_publishQueue.clear();
    }

    /**
     * Flushes the resource list cache.<p>
     */
    public void flushResourceLists() {

        m_resourceListCache.clear();
    }

    /**
     * Flushes the resource cache.<p>
     */
    public void flushResources() {

        m_resourceCache.clear();
    }

    /**
     * Flushes the role lists cache.<p>
     */
    public void flushRoleLists() {

        m_roleListsCache.clear();
    }

    /**
     * Flushes the roles cache.<p>
     */
    public void flushRoles() {

        m_rolesCache.clear();
    }

    /**
     * Flushes the user groups cache.<p>
     */
    public void flushUserGroups() {

        m_userGroupsCache.clear();
    }

    /**
     * Flushes the users cache.<p>
     */
    public void flushUsers() {

        m_userCache.clear();
    }

    /**
     * Flushes the vfs object cache.<p>
     */
    public void flushVfsObjects() {

        m_vfsObjectCache.clear();
    }

    /**
     * Flushes the xml permanent entities cache.<p>
     */
    public void flushXmlPermanentEntities() {

        m_xmlPermanentEntityCache.clear();

    }

    /**
     * Flushes the xml temporary entities cache.<p>
     */
    public void flushXmlTemporaryEntities() {

        m_xmlTemporaryEntityCache.clear();

    }

    /**
     * Returns all cached lock root paths.<p>
     * 
     * @return a list of {@link String} objects
     */
    public List getAllCachedLockPaths() {

        return new ArrayList(m_lockCache.keySet());
    }

    /**
     * Returns all cached locks.<p>
     * 
     * @return a list of {@link CmsLock} objects
     */
    public List getAllCachedLocks() {

        return new ArrayList(m_lockCache.values());
    }

    /**
     * Returns all cached publish jobs in the queue as ordered list.<p>
     * 
     * @return all cached publish jobs

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -