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>
CacheStatisticsProvider
implementation 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 CacheStatistics
getCacheStatistics(ObjectName objectName)
Return the currentCacheStatistics
snapshot from the MBean identified by the specifiedObjectName
.protected ObjectName
getObjectName(org.springframework.cache.jcache.JCacheCache cache)
Return theObjectName
of the MBean that is managing the specified cache ornull
if 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:AbstractJmxCacheStatisticsProvider
Return theObjectName
of the MBean that is managing the specified cache ornull
if none is found.- Specified by:
getObjectName
in classAbstractJmxCacheStatisticsProvider<org.springframework.cache.jcache.JCacheCache>
- Parameters:
cache
- the cache to handle- Returns:
- the object name of the cache statistics MBean
- Throws:
MalformedObjectNameException
- if theObjectName
for that cache is invalid
getCacheStatistics
protected CacheStatistics getCacheStatistics(ObjectName objectName)
Description copied from class:AbstractJmxCacheStatisticsProvider
Return the currentCacheStatistics
snapshot from the MBean identified by the specifiedObjectName
.- Specified by:
getCacheStatistics
in classAbstractJmxCacheStatisticsProvider<org.springframework.cache.jcache.JCacheCache>
- Parameters:
objectName
- the object name of the cache statistics MBean- Returns:
- the current cache statistics