Package net.rubyeye.xmemcached.monitor
Class StatisticsHandler
- java.lang.Object
-
- net.rubyeye.xmemcached.monitor.StatisticsHandler
-
- All Implemented Interfaces:
StatisticsHandlerMBean
public class StatisticsHandler extends java.lang.Object implements StatisticsHandlerMBean
Statistics helper
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<CommandType,java.util.concurrent.atomic.AtomicLong>counterMapprivate booleanstatistics
-
Constructor Summary
Constructors Constructor Description StatisticsHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidbuildCounterMap()longgetAddCount()longgetAppendCount()longgetCASCount()longgetDecrCount()longgetDeleteCount()longgetGetHitCount()longgetGetMissCount()longgetIncrCount()longgetMultiGetCount()longgetMultiGetsCount()longgetPrependCount()longgetReplaceCount()longgetSetCount()booleanisStatistics()voidresetStats()Reset the statisticsvoidsetStatistics(boolean statistics)voidstatistics(CommandType cmdType)voidstatistics(CommandType cmdType, int count)
-
-
-
Field Detail
-
counterMap
private java.util.Map<CommandType,java.util.concurrent.atomic.AtomicLong> counterMap
-
statistics
private boolean statistics
-
-
Method Detail
-
buildCounterMap
private void buildCounterMap()
-
isStatistics
public final boolean isStatistics()
- Specified by:
isStatisticsin interfaceStatisticsHandlerMBean
-
statistics
public final void statistics(CommandType cmdType)
-
statistics
public final void statistics(CommandType cmdType, int count)
-
setStatistics
public final void setStatistics(boolean statistics)
- Specified by:
setStatisticsin interfaceStatisticsHandlerMBean
-
resetStats
public void resetStats()
Description copied from interface:StatisticsHandlerMBeanReset the statistics- Specified by:
resetStatsin interfaceStatisticsHandlerMBean
-
getAppendCount
public long getAppendCount()
- Specified by:
getAppendCountin interfaceStatisticsHandlerMBean
-
getCASCount
public long getCASCount()
- Specified by:
getCASCountin interfaceStatisticsHandlerMBean
-
getDecrCount
public long getDecrCount()
- Specified by:
getDecrCountin interfaceStatisticsHandlerMBean
-
getDeleteCount
public long getDeleteCount()
- Specified by:
getDeleteCountin interfaceStatisticsHandlerMBean
-
getGetHitCount
public long getGetHitCount()
- Specified by:
getGetHitCountin interfaceStatisticsHandlerMBean
-
getGetMissCount
public long getGetMissCount()
- Specified by:
getGetMissCountin interfaceStatisticsHandlerMBean
-
getIncrCount
public long getIncrCount()
- Specified by:
getIncrCountin interfaceStatisticsHandlerMBean
-
getMultiGetCount
public long getMultiGetCount()
- Specified by:
getMultiGetCountin interfaceStatisticsHandlerMBean
-
getMultiGetsCount
public long getMultiGetsCount()
- Specified by:
getMultiGetsCountin interfaceStatisticsHandlerMBean
-
getPrependCount
public long getPrependCount()
- Specified by:
getPrependCountin interfaceStatisticsHandlerMBean
-
getSetCount
public long getSetCount()
- Specified by:
getSetCountin interfaceStatisticsHandlerMBean
-
getAddCount
public long getAddCount()
- Specified by:
getAddCountin interfaceStatisticsHandlerMBean
-
getReplaceCount
public long getReplaceCount()
- Specified by:
getReplaceCountin interfaceStatisticsHandlerMBean
-
-