/** * Flushes all cached objects.<p> * * @throws Exception if something goes wrong */ public void shutdown() throws Exception { for (CacheType type : CacheType.values()) { flushCache(type); } }
/** * Clears all the depending caches when a resource was changed.<p> */ public void clearResourceCache() { flushCache(CacheType.RESOURCE); flushCache(CacheType.RESOURCE_LIST); flushCache(CacheType.HAS_ROLE); flushCache(CacheType.ROLE_LIST); }
/** * Initializes a new instance of the memory status with the current memory values.<p> */ public CmsMemoryStatus() { update(); }
/** * Clears the user cache for the given user.<p> * * @param user the user */ public void clearUserCache(CmsUser user) { uncacheUser(user); flushCache(CacheType.RESOURCE_LIST); }
/** * Updates the memory information of the memory monitor.<p> */ protected void updateStatus() { m_memoryCurrent.update(); m_memoryAverage.calculateAverage(m_memoryCurrent); } }
/** * Clears the access control list cache when access control entries are changed.<p> */ public void clearAccessControlListCache() { flushCache(CacheType.ACL); flushCache(CacheType.PERMISSION); clearResourceCache(); }
/** * Clears almost all internal caches.<p> */ public void clearCache() { clearPrincipalsCache(); flushCache(CacheType.PROJECT); flushCache(CacheType.RESOURCE); flushCache(CacheType.RESOURCE_LIST); flushCache(CacheType.PROPERTY); flushCache(CacheType.PROPERTY_LIST); flushCache(CacheType.PROJECT_RESOURCES); flushCache(CacheType.PUBLISHED_RESOURCES); }
/** * Returns true if the system runs low on memory.<p> * * @return true if the system runs low on memory */ public boolean lowMemory() { return ((m_maxUsagePercent > 0) && (m_memoryCurrent.getUsage() > m_maxUsagePercent)); }
/** * Initializes the caches.<p> * * @param cacheSize the cache size */ protected void initCaches(int cacheSize) { m_offlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize); m_onlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize); }
/** * Flushes all cached objects.<p> * * @throws Exception if something goes wrong */ public void shutdown() throws Exception { for (CacheType type : CacheType.values()) { flushCache(type); } }
/** * Clears the user cache for the given user.<p> * * @param user the user */ public void clearUserCache(CmsUser user) { uncacheUser(user); flushCache(CacheType.RESOURCE_LIST); }
/** * Updates the memory information of the memory monitor.<p> */ protected void updateStatus() { m_memoryCurrent.update(); m_memoryAverage.calculateAverage(m_memoryCurrent); } }
/** * Clears the access control list cache when access control entries are changed.<p> */ public void clearAccessControlListCache() { flushCache(CacheType.ACL); flushCache(CacheType.PERMISSION); clearResourceCache(); }
/** * Clears almost all internal caches.<p> */ public void clearCache() { clearPrincipalsCache(); flushCache(CacheType.PROJECT); flushCache(CacheType.RESOURCE); flushCache(CacheType.RESOURCE_LIST); flushCache(CacheType.PROPERTY); flushCache(CacheType.PROPERTY_LIST); flushCache(CacheType.PROJECT_RESOURCES); flushCache(CacheType.PUBLISHED_RESOURCES); }
/** * Clears all the depending caches when a resource was changed.<p> */ public void clearResourceCache() { flushCache(CacheType.RESOURCE); flushCache(CacheType.RESOURCE_LIST); flushCache(CacheType.HAS_ROLE); flushCache(CacheType.ROLE_LIST); }
/** * Returns the current memory status.<p> * * @return the memory status */ public CmsMemoryStatus getMemoryStatus() { m_memoryCurrent.update(); return m_memoryCurrent; }
/** * Returns true if the system runs low on memory.<p> * * @return true if the system runs low on memory */ public boolean lowMemory() { return ((m_maxUsagePercent > 0) && (m_memoryCurrent.getUsage() > m_maxUsagePercent)); }
/** * Flushes the ACL cache.<p> * * @deprecated use {@link #flushCache(CacheType[])} instead */ public void flushACLs() { flushCache(CacheType.ACL); }
/** * Initializes a new instance of the memory status with the current memory values.<p> */ public CmsMemoryStatus() { update(); }
/** * Clears all internal principal-related caches.<p> */ public void clearPrincipalsCache() { flushCache(CacheType.USER); flushCache(CacheType.GROUP); flushCache(CacheType.ORG_UNIT); flushCache(CacheType.ACL); flushCache(CacheType.PERMISSION); flushCache(CacheType.HAS_ROLE); flushCache(CacheType.ROLE_LIST); flushCache(CacheType.USERGROUPS); }