Package org.infinispan.stats.impl
Class ClusterCacheStatsImpl
- java.lang.Object
-
- org.infinispan.stats.impl.AbstractClusterStats
-
- org.infinispan.stats.impl.ClusterCacheStatsImpl
-
- All Implemented Interfaces:
JmxStatisticsExposer
,ClusterCacheStats
,Stats
public class ClusterCacheStatsImpl extends AbstractClusterStats implements ClusterCacheStats
-
-
Field Summary
-
Fields inherited from class org.infinispan.stats.impl.AbstractClusterStats
DEFAULT_STALE_STATS_THRESHOLD
-
-
Constructor Summary
Constructors Constructor Description ClusterCacheStatsImpl()
-
Method Summary
-
Methods inherited from class org.infinispan.stats.impl.AbstractClusterStats
getStaleStatsThreshold, getStatisticsEnabled, getTimeSinceReset, isStatisticsEnabled, resetStatistics, setStaleStatsThreshold, setStatisticsEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.stats.Stats
getTimeSinceReset, setStatisticsEnabled
-
-
-
-
Method Detail
-
injectDependencies
public void injectDependencies(Cache<?,?> cache, Configuration configuration)
-
start
public void start()
-
getAverageReadTime
public long getAverageReadTime()
- Specified by:
getAverageReadTime
in interfaceStats
- Returns:
- Average number of milliseconds for a cache get on the cache
-
getAverageReadTimeNanos
public long getAverageReadTimeNanos()
- Specified by:
getAverageReadTimeNanos
in interfaceStats
- Returns:
- Average number of nanoseconds for a cache get on the cache
-
getAverageRemoveTime
public long getAverageRemoveTime()
- Specified by:
getAverageRemoveTime
in interfaceStats
- Returns:
- Average number of milliseconds for a cache remove on the cache
-
getAverageRemoveTimeNanos
public long getAverageRemoveTimeNanos()
- Specified by:
getAverageRemoveTimeNanos
in interfaceStats
- Returns:
- Average number of nanoseconds for a cache remove on the cache
-
getAverageWriteTime
public long getAverageWriteTime()
- Specified by:
getAverageWriteTime
in interfaceStats
- Returns:
- Average number of milliseconds for a cache put on the cache
-
getAverageWriteTimeNanos
public long getAverageWriteTimeNanos()
- Specified by:
getAverageWriteTimeNanos
in interfaceStats
- Returns:
- Average number of milliseconds for a cache put on the cache
-
getRequiredMinimumNumberOfNodes
public int getRequiredMinimumNumberOfNodes()
- Specified by:
getRequiredMinimumNumberOfNodes
in interfaceStats
- Returns:
- Required minimum number of nodes to guarantee data consistency
-
getEvictions
public long getEvictions()
- Specified by:
getEvictions
in interfaceStats
- Returns:
- Number of cache eviction.
-
getHits
public long getHits()
-
getHitRatio
public double getHitRatio()
- Specified by:
getHitRatio
in interfaceClusterCacheStats
- Returns:
- cluster wide total percentage hit/(hit+miss) ratio for this cache
-
getMisses
public long getMisses()
-
getNumberOfEntries
public int getNumberOfEntries()
-
getCurrentNumberOfEntriesInMemory
public int getCurrentNumberOfEntriesInMemory()
Description copied from interface:Stats
The same asStats.getCurrentNumberOfEntries()
, however passivated entries are not included.- Specified by:
getCurrentNumberOfEntriesInMemory
in interfaceStats
-
getReadWriteRatio
public double getReadWriteRatio()
- Specified by:
getReadWriteRatio
in interfaceClusterCacheStats
- Returns:
- cluster wide read/writes ratio for the cache
-
getRemoveHits
public long getRemoveHits()
- Specified by:
getRemoveHits
in interfaceStats
- Returns:
- Number of cache removal hits.
-
getRemoveMisses
public long getRemoveMisses()
- Specified by:
getRemoveMisses
in interfaceStats
- Returns:
- Number of cache removal misses.
-
getStores
public long getStores()
-
getTimeSinceStart
public long getTimeSinceStart()
- Specified by:
getTimeSinceStart
in interfaceStats
- Returns:
- Number of seconds since cache started.
-
getCurrentNumberOfEntries
public int getCurrentNumberOfEntries()
Description copied from interface:Stats
Returns the number of entries currently in this cache instance. When the cache is configured with distribution, this method only returns the number of entries in the local cache instance. In other words, it does not attempt to communicate with other nodes to find out about the data stored in other nodes in the cluster that is not available locally.- Specified by:
getCurrentNumberOfEntries
in interfaceStats
- Returns:
- Number of entries currently in the cache, including passivated entries.
-
getTotalNumberOfEntries
public long getTotalNumberOfEntries()
Description copied from interface:Stats
Number of entries stored in cache since the cache started running.- Specified by:
getTotalNumberOfEntries
in interfaceStats
-
getDataMemoryUsed
public long getDataMemoryUsed()
Description copied from interface:Stats
Provides how much memory the current eviction algorithm estimates is in use for data. This method will return a number 0 or greater if memory eviction is in use. If memory eviction is not enabled this method will always return 0.- Specified by:
getDataMemoryUsed
in interfaceStats
- Returns:
- memory in use or 0 if memory eviction is not enabled
-
getOffHeapMemoryUsed
public long getOffHeapMemoryUsed()
Description copied from interface:Stats
The amount of off-heap memory used by this cache- Specified by:
getOffHeapMemoryUsed
in interfaceStats
- Returns:
-
getRetrievals
public long getRetrievals()
- Specified by:
getRetrievals
in interfaceStats
- Returns:
- Number of get operations.
-
reset
public void reset()
Description copied from interface:Stats
Reset statistics- Specified by:
reset
in interfaceStats
- Overrides:
reset
in classAbstractClusterStats
-
getNumberOfLocksAvailable
public int getNumberOfLocksAvailable()
- Specified by:
getNumberOfLocksAvailable
in interfaceClusterCacheStats
- Returns:
- the total number of exclusive locks available in the cluster
-
getNumberOfLocksHeld
public int getNumberOfLocksHeld()
- Specified by:
getNumberOfLocksHeld
in interfaceClusterCacheStats
- Returns:
- the total number of exclusive locks held in the cluster
-
getInvalidations
public long getInvalidations()
- Specified by:
getInvalidations
in interfaceClusterCacheStats
- Returns:
- the total number of invalidations in the cluster
-
getActivations
public long getActivations()
- Specified by:
getActivations
in interfaceClusterCacheStats
- Returns:
- the total number of actiavtions in the cluster
-
getPassivations
public long getPassivations()
- Specified by:
getPassivations
in interfaceClusterCacheStats
- Returns:
- the total number of passivations in the cluster
-
getCacheLoaderLoads
public long getCacheLoaderLoads()
- Specified by:
getCacheLoaderLoads
in interfaceClusterCacheStats
- Returns:
- the total number of cacheloader load operations in the cluster
-
getCacheLoaderMisses
public long getCacheLoaderMisses()
- Specified by:
getCacheLoaderMisses
in interfaceClusterCacheStats
- Returns:
- the total number of cacheloader misses in the cluster
-
getStoreWrites
public long getStoreWrites()
- Specified by:
getStoreWrites
in interfaceClusterCacheStats
- Returns:
- the total number of cachewriter store operations in the cluster
-
getStaleStatsThreshold
public abstract long getStaleStatsThreshold()
- Returns:
- The time in milliseconds, to wait between requests before re-retrieving cluster wide stats
-
setStaleStatsThreshold
public abstract void setStaleStatsThreshold(long threshold)
- Parameters:
threshold
- the time in milliseconds, to wait between requests before re-retrieving cluster wide stats
-
-