Package org.infinispan.hotrod.impl.cache
Class ClientStatistics
- java.lang.Object
-
- org.infinispan.hotrod.impl.cache.ClientStatistics
-
- All Implemented Interfaces:
RemoteCacheClientStatisticsMXBean
public final class ClientStatistics extends Object implements RemoteCacheClientStatisticsMXBean
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddataRead(boolean foundValue, long startTimeNanoSeconds, int count)voiddataRemove(long startTimeNanoSeconds, int count)voiddataStore(long startTimeNanoSeconds, int count)static ClientStatisticsdummyClientStatistics(org.infinispan.commons.time.TimeService timeService)It returns aClientStatisticsinstance to be used when the statistics aren't needed.longgetAverageRemoteReadTime()Returns the average read time, in milliseconds, for a remote cache.longgetAverageRemoteRemovesTime()Returns the average time, in milliseconds, for remove operations in a remote cache.longgetAverageRemoteStoreTime()Returns the average store time, in milliseconds, for a remote cache.longgetNearCacheHits()Returns the number of near-cache hits.longgetNearCacheInvalidations()Returns the number of near-cache invalidations.longgetNearCacheMisses()Returns the number of near-cache misses.longgetNearCacheSize()Returns the number of entries currently stored in the near-cache.longgetRemoteHits()Returns the number of hits for a remote cache.longgetRemoteMisses()Returns the number of misses for a remote cache.longgetRemoteRemoves()Returns the number of removes for a remote cache.longgetRemoteStores()Returns the number of remote cache stores (put, replace) that the client applied.longgetTimeSinceReset()Returns the time, in seconds, since the last reset.voidincrementNearCacheHits()voidincrementNearCacheInvalidations()voidincrementNearCacheMisses()booleanisEnabled()voidresetStatistics()Resets statistics.longtime()
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
-
getRemoteHits
public long getRemoteHits()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the number of hits for a remote cache.- Specified by:
getRemoteHitsin interfaceRemoteCacheClientStatisticsMXBean
-
getRemoteMisses
public long getRemoteMisses()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the number of misses for a remote cache.- Specified by:
getRemoteMissesin interfaceRemoteCacheClientStatisticsMXBean
-
getAverageRemoteReadTime
public long getAverageRemoteReadTime()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the average read time, in milliseconds, for a remote cache.- Specified by:
getAverageRemoteReadTimein interfaceRemoteCacheClientStatisticsMXBean
-
getRemoteStores
public long getRemoteStores()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the number of remote cache stores (put, replace) that the client applied. Failed conditional operations do not increase the count of entries in the remote cache. Put operations always increase the count even if an operation replaces an equal value.- Specified by:
getRemoteStoresin interfaceRemoteCacheClientStatisticsMXBean
-
getAverageRemoteStoreTime
public long getAverageRemoteStoreTime()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the average store time, in milliseconds, for a remote cache.- Specified by:
getAverageRemoteStoreTimein interfaceRemoteCacheClientStatisticsMXBean
-
getRemoteRemoves
public long getRemoteRemoves()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the number of removes for a remote cache.- Specified by:
getRemoteRemovesin interfaceRemoteCacheClientStatisticsMXBean
-
getAverageRemoteRemovesTime
public long getAverageRemoteRemovesTime()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the average time, in milliseconds, for remove operations in a remote cache.- Specified by:
getAverageRemoteRemovesTimein interfaceRemoteCacheClientStatisticsMXBean
-
getNearCacheHits
public long getNearCacheHits()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the number of near-cache hits. Returns a value of 0 if near-caching is disabled.- Specified by:
getNearCacheHitsin interfaceRemoteCacheClientStatisticsMXBean
-
getNearCacheMisses
public long getNearCacheMisses()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the number of near-cache misses. Returns a value of 0 if near-caching is disabled.- Specified by:
getNearCacheMissesin interfaceRemoteCacheClientStatisticsMXBean
-
getNearCacheInvalidations
public long getNearCacheInvalidations()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the number of near-cache invalidations. Returns a value of 0 if near-caching is disabled.- Specified by:
getNearCacheInvalidationsin interfaceRemoteCacheClientStatisticsMXBean
-
getNearCacheSize
public long getNearCacheSize()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the number of entries currently stored in the near-cache. Returns a value of 0 if near-caching is disabled.- Specified by:
getNearCacheSizein interfaceRemoteCacheClientStatisticsMXBean
-
time
public long time()
-
dataRead
public void dataRead(boolean foundValue, long startTimeNanoSeconds, int count)
-
dataStore
public void dataStore(long startTimeNanoSeconds, int count)
-
dataRemove
public void dataRemove(long startTimeNanoSeconds, int count)
-
incrementNearCacheMisses
public void incrementNearCacheMisses()
-
incrementNearCacheHits
public void incrementNearCacheHits()
-
incrementNearCacheInvalidations
public void incrementNearCacheInvalidations()
-
resetStatistics
public void resetStatistics()
Description copied from interface:RemoteCacheClientStatisticsMXBeanResets statistics.- Specified by:
resetStatisticsin interfaceRemoteCacheClientStatisticsMXBean
-
getTimeSinceReset
public long getTimeSinceReset()
Description copied from interface:RemoteCacheClientStatisticsMXBeanReturns the time, in seconds, since the last reset. SeeRemoteCacheClientStatisticsMXBean.resetStatistics()- Specified by:
getTimeSinceResetin interfaceRemoteCacheClientStatisticsMXBean
-
dummyClientStatistics
public static ClientStatistics dummyClientStatistics(org.infinispan.commons.time.TimeService timeService)
It returns aClientStatisticsinstance to be used when the statistics aren't needed.- Returns:
- a disabled
ClientStatisticsinstance.
-
-