C - The cache typepublic abstract class AbstractJmxCacheStatisticsProvider<C extends Cache> extends Object implements CacheStatisticsProvider<C>
CacheStatisticsProvider implementation that uses JMX to retrieve the cache
statistics.| Constructor and Description |
|---|
AbstractJmxCacheStatisticsProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
getAttribute(ObjectName objectName,
String attributeName,
Class<T> type) |
CacheStatistics |
getCacheStatistics(CacheManager cacheManager,
C cache)
Return the current
CacheStatistics snapshot for the specified Cache
or null if the given cache could not be handled. |
protected abstract CacheStatistics |
getCacheStatistics(ObjectName objectName)
Return the current
CacheStatistics snapshot from the MBean identified by
the specified ObjectName. |
protected MBeanServer |
getMBeanServer() |
protected abstract ObjectName |
getObjectName(C cache)
Return the
ObjectName of the MBean that is managing the specified cache or
null if none is found. |
public CacheStatistics getCacheStatistics(CacheManager cacheManager, C cache)
CacheStatisticsProviderCacheStatistics snapshot for the specified Cache
or null if the given cache could not be handled.getCacheStatistics in interface CacheStatisticsProvider<C extends Cache>cacheManager - the CacheManager handling this cachecache - the cache to handlenullprotected abstract ObjectName getObjectName(C cache) throws MalformedObjectNameException
ObjectName of the MBean that is managing the specified cache or
null if none is found.cache - the cache to handleMalformedObjectNameException - if the ObjectName for that cache is
invalidprotected abstract CacheStatistics getCacheStatistics(ObjectName objectName)
CacheStatistics snapshot from the MBean identified by
the specified ObjectName.objectName - the object name of the cache statistics MBeanprotected MBeanServer getMBeanServer()
protected <T> T getAttribute(ObjectName objectName, String attributeName, Class<T> type)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.