Class JCacheCacheStatisticsProvider
- java.lang.Object
- org.springframework.boot.actuate.cache.AbstractJmxCacheStatisticsProvider<org.springframework.cache.jcache.JCacheCache>
- org.springframework.boot.actuate.cache.JCacheCacheStatisticsProvider
- All Implemented Interfaces:
CacheStatisticsProvider<org.springframework.cache.jcache.JCacheCache>
public class JCacheCacheStatisticsProvider extends AbstractJmxCacheStatisticsProvider<org.springframework.cache.jcache.JCacheCache>
CacheStatisticsProviderimplementation for a JSR-107 compliant cache.- Since:
- 1.3.0
Constructor Summary
Constructors Constructor Description JCacheCacheStatisticsProvider()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CacheStatisticsgetCacheStatistics(ObjectName objectName)Return the currentCacheStatisticssnapshot from the MBean identified by the specifiedObjectName.protected ObjectNamegetObjectName(org.springframework.cache.jcache.JCacheCache cache)Return theObjectNameof the MBean that is managing the specified cache ornullif none is found.Methods inherited from class org.springframework.boot.actuate.cache.AbstractJmxCacheStatisticsProvider
getAttribute, getCacheStatistics, getMBeanServer
Constructor Detail
JCacheCacheStatisticsProvider
public JCacheCacheStatisticsProvider()
Method Detail
getObjectName
protected ObjectName getObjectName(org.springframework.cache.jcache.JCacheCache cache) throws MalformedObjectNameException
Description copied from class:AbstractJmxCacheStatisticsProviderReturn theObjectNameof the MBean that is managing the specified cache ornullif none is found.- Specified by:
getObjectNamein classAbstractJmxCacheStatisticsProvider<org.springframework.cache.jcache.JCacheCache>- Parameters:
cache- the cache to handle- Returns:
- the object name of the cache statistics MBean
- Throws:
MalformedObjectNameException- if theObjectNamefor that cache is invalid
getCacheStatistics
protected CacheStatistics getCacheStatistics(ObjectName objectName)
Description copied from class:AbstractJmxCacheStatisticsProviderReturn the currentCacheStatisticssnapshot from the MBean identified by the specifiedObjectName.- Specified by:
getCacheStatisticsin classAbstractJmxCacheStatisticsProvider<org.springframework.cache.jcache.JCacheCache>- Parameters:
objectName- the object name of the cache statistics MBean- Returns:
- the current cache statistics