Class EhCacheStatisticsManager
- java.lang.Object
-
- com.atlassian.confluence.cache.ehcache.EhCacheStatisticsManager
-
- All Implemented Interfaces:
CacheStatisticsManager
public class EhCacheStatisticsManager extends Object implements CacheStatisticsManager
Provides CacheStatistics for EhCache.
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.cache.CacheStatisticsManager
CACHE_NAME_PREFIX
-
-
Constructor Summary
Constructors Constructor Description EhCacheStatisticsManager(I18NBeanFactory i18NBeanFactory, net.sf.ehcache.CacheManager ehCacheManager, EhCacheSettingsDefaultsProvider settingsProvider, FormatSettingsManager formatSettingsManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate<com.atlassian.cache.CacheStatisticsKey>
getCacheStatisticFilter(String cacheName)
EhCacheSettingsDefaultsProvider
has knowledge of which caches it is safe to measure the heap size of, so we return a predicate that will removeCacheStatisticsKey.HEAP_SIZE
in those cases.Set<CacheStatisticsCapability>
getCapabilities()
Returns the set of optional capabilities supported by this implementationList<CacheStatistics>
getLocalCacheStatistics()
Retrieve all the cache statistics for locally held caches.CacheStatistics
getLocalCacheStatistics(String cacheName)
Retrieve the cache statistics for one locally held cache.
-
-
-
Constructor Detail
-
EhCacheStatisticsManager
public EhCacheStatisticsManager(I18NBeanFactory i18NBeanFactory, net.sf.ehcache.CacheManager ehCacheManager, EhCacheSettingsDefaultsProvider settingsProvider, FormatSettingsManager formatSettingsManager) throws org.dom4j.DocumentException
- Throws:
org.dom4j.DocumentException
-
-
Method Detail
-
getLocalCacheStatistics
public List<CacheStatistics> getLocalCacheStatistics()
Description copied from interface:CacheStatisticsManager
Retrieve all the cache statistics for locally held caches. In a clustered setting, distributed caches will report only on the locally held portion of the cache.- Specified by:
getLocalCacheStatistics
in interfaceCacheStatisticsManager
- Returns:
- list of cache statistics sorted by their localised
CacheStatistics.getNiceName()
.
-
getLocalCacheStatistics
public CacheStatistics getLocalCacheStatistics(String cacheName)
Description copied from interface:CacheStatisticsManager
Retrieve the cache statistics for one locally held cache. In a clustered setting, distributed caches will report only on the locally held portion of the cache.- Specified by:
getLocalCacheStatistics
in interfaceCacheStatisticsManager
- Returns:
- list of cache statistics sorted by their localised
CacheStatistics.getNiceName()
.
-
getCapabilities
public Set<CacheStatisticsCapability> getCapabilities()
Description copied from interface:CacheStatisticsManager
Returns the set of optional capabilities supported by this implementation- Specified by:
getCapabilities
in interfaceCacheStatisticsManager
- Since:
- 5.5
-
getCacheStatisticFilter
public Predicate<com.atlassian.cache.CacheStatisticsKey> getCacheStatisticFilter(String cacheName)
EhCacheSettingsDefaultsProvider
has knowledge of which caches it is safe to measure the heap size of, so we return a predicate that will removeCacheStatisticsKey.HEAP_SIZE
in those cases.- Specified by:
getCacheStatisticFilter
in interfaceCacheStatisticsManager
- Since:
- 7.5
-
-