Package net.sf.ehcache.statistics.beans
Class ExtendedStatisticsMBean
- java.lang.Object
-
- net.sf.ehcache.statistics.beans.ProxiedDynamicMBean
-
- net.sf.ehcache.statistics.beans.ExtendedStatisticsMBean
-
- All Implemented Interfaces:
javax.management.DynamicMBean
public class ExtendedStatisticsMBean extends ProxiedDynamicMBean
A dynamically built mbean based on the available statistics for a cache.- Author:
- cschanck
-
-
Constructor Summary
Constructors Constructor Description ExtendedStatisticsMBean(Ehcache cache, ExtendedStatistics extendedStatistics)Instantiates a new extended statistics m bean.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringdivineName(Ehcache cache)Divine the name.protected java.util.MaphistoryToMapDouble(java.util.List<org.terracotta.statistics.archive.Timestamped<java.lang.Double>> history)History to map double.protected java.util.MaphistoryToMapLong(java.util.List<org.terracotta.statistics.archive.Timestamped<java.lang.Long>> history)History to map long.voidrecordDoubleStatistic(java.util.List<AttributeProxy> proxies, java.lang.String longerName, java.lang.String baseDescription, ExtendedStatistics.Statistic<java.lang.Double> stat)Record double statistic.voidrecordLongStatistic(java.util.List<AttributeProxy> proxies, java.lang.String longerName, java.lang.String baseDescription, ExtendedStatistics.Statistic<java.lang.Long> stat)Record long statistic.-
Methods inherited from class net.sf.ehcache.statistics.beans.ProxiedDynamicMBean
getAttribute, getAttributes, getBeanName, getMBeanInfo, initialize, invoke, setAttribute, setAttributes
-
-
-
-
Constructor Detail
-
ExtendedStatisticsMBean
public ExtendedStatisticsMBean(Ehcache cache, ExtendedStatistics extendedStatistics)
Instantiates a new extended statistics m bean.- Parameters:
cache- the cacheextendedStatistics- the extended statistics
-
-
Method Detail
-
recordDoubleStatistic
public void recordDoubleStatistic(java.util.List<AttributeProxy> proxies, java.lang.String longerName, java.lang.String baseDescription, ExtendedStatistics.Statistic<java.lang.Double> stat)
Record double statistic.- Parameters:
proxies- the proxieslongerName- the longer namebaseDescription- the base descriptionstat- the stat
-
recordLongStatistic
public void recordLongStatistic(java.util.List<AttributeProxy> proxies, java.lang.String longerName, java.lang.String baseDescription, ExtendedStatistics.Statistic<java.lang.Long> stat)
Record long statistic.- Parameters:
proxies- the proxieslongerName- the longer namebaseDescription- the base descriptionstat- the stat
-
historyToMapLong
protected java.util.Map historyToMapLong(java.util.List<org.terracotta.statistics.archive.Timestamped<java.lang.Long>> history)
History to map long.- Parameters:
history- the history- Returns:
- the map
-
historyToMapDouble
protected java.util.Map historyToMapDouble(java.util.List<org.terracotta.statistics.archive.Timestamped<java.lang.Double>> history)
History to map double.- Parameters:
history- the history- Returns:
- the map
-
divineName
public static java.lang.String divineName(Ehcache cache)
Divine the name.- Parameters:
cache- the cache- Returns:
- the string
-
-