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
@MBean(objectName="ClusterCacheStats", description="General cluster statistics such as timings, hit/miss ratio, etc. for a cache.") public class ClusterCacheStatsImpl extends AbstractClusterStats implements ClusterCacheStats
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClusterCacheStatsImpl.DistributedCacheStatsCallableExternalizer
-
Field Summary
-
Fields inherited from class org.infinispan.stats.impl.AbstractClusterStats
DEFAULT_STALE_STATS_THRESHOLD
-
Fields inherited from interface org.infinispan.stats.ClusterCacheStats
OBJECT_NAME
-
-
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
@ManagedAttribute(description="Cluster wide total average number of milliseconds for a read operation on the cache", displayName="Cluster wide total average read time (ms)", units=MILLISECONDS) public long getAverageReadTime()- Specified by:
getAverageReadTimein interfaceStats- Returns:
- Average number of milliseconds for a cache get on the cache
-
getAverageReadTimeNanos
@ManagedAttribute(description="Cluster wide total average number of nanoseconds for a read operation on the cache", displayName="Cluster wide total average read time (ns)", units=NANOSECONDS) public long getAverageReadTimeNanos()- Specified by:
getAverageReadTimeNanosin interfaceStats- Returns:
- Average number of nanoseconds for a cache get on the cache
-
getAverageRemoveTime
@ManagedAttribute(description="Cluster wide total average number of milliseconds for a remove operation in the cache", displayName="Cluster wide total average remove time (ms)", units=MILLISECONDS) public long getAverageRemoveTime()- Specified by:
getAverageRemoveTimein interfaceStats- Returns:
- Average number of milliseconds for a cache remove on the cache
-
getAverageRemoveTimeNanos
@ManagedAttribute(description="Cluster wide total average number of nanoseconds for a remove operation in the cache", displayName="Cluster wide total average remove time (ns)", units=NANOSECONDS) public long getAverageRemoveTimeNanos()- Specified by:
getAverageRemoveTimeNanosin interfaceStats- Returns:
- Average number of nanoseconds for a cache remove on the cache
-
getAverageWriteTime
@ManagedAttribute(description="Cluster wide average number of milliseconds for a write operation in the cache", displayName="Cluster wide average write time (ms)", units=MILLISECONDS) public long getAverageWriteTime()- Specified by:
getAverageWriteTimein interfaceStats- Returns:
- Average number of milliseconds for a cache put on the cache
-
getAverageWriteTimeNanos
@ManagedAttribute(description="Cluster wide average number of nanoseconds for a write operation in the cache", displayName="Cluster wide average write time (ns)", units=NANOSECONDS) public long getAverageWriteTimeNanos()- Specified by:
getAverageWriteTimeNanosin interfaceStats- Returns:
- Average number of milliseconds for a cache put on the cache
-
getRequiredMinimumNumberOfNodes
@ManagedAttribute(description="Required minimum number of nodes to hold current cache data", displayName="Required minimum number of nodes") public int getRequiredMinimumNumberOfNodes()- Specified by:
getRequiredMinimumNumberOfNodesin interfaceStats- Returns:
- Required minimum number of nodes to guarantee data consistency
-
getEvictions
@ManagedAttribute(description="Cluster wide total number of cache eviction operations", displayName="Cluster wide total number of cache evictions", measurementType=TRENDSUP) public long getEvictions()- Specified by:
getEvictionsin interfaceStats- Returns:
- Number of cache eviction.
-
getHits
@ManagedAttribute(description="Cluster wide total number of cache attribute hits", displayName="Cluster wide total number of cache hits", measurementType=TRENDSUP) public long getHits()
-
getHitRatio
@ManagedAttribute(description="Cluster wide total percentage hit/(hit+miss) ratio for this cache", displayName="Cluster wide total hit ratio", units=PERCENTAGE) public double getHitRatio()- Specified by:
getHitRatioin interfaceClusterCacheStats- Returns:
- cluster wide total percentage hit/(hit+miss) ratio for this cache
-
getMisses
@ManagedAttribute(description="Cluster wide total number of cache attribute misses", displayName="Cluster wide total number of cache misses", measurementType=TRENDSUP) public long getMisses()
-
getNumberOfEntries
@ManagedAttribute(description="Cluster wide total number of entries currently in the cache, including passivated entries", displayName="Cluster wide total number of current cache entries") public int getNumberOfEntries()
-
getCurrentNumberOfEntriesInMemory
@ManagedAttribute(description="Cluster wide total number of entries currently stored in-memory", displayName="Cluster wide total number of in-memory cache entries") public int getCurrentNumberOfEntriesInMemory()Description copied from interface:StatsThe same asStats.getCurrentNumberOfEntries(), however passivated entries are not included.- Specified by:
getCurrentNumberOfEntriesInMemoryin interfaceStats
-
getReadWriteRatio
@ManagedAttribute(description="Cluster wide read/writes ratio for the cache", displayName="Cluster wide read/write ratio", units=PERCENTAGE) public double getReadWriteRatio()- Specified by:
getReadWriteRatioin interfaceClusterCacheStats- Returns:
- cluster wide read/writes ratio for the cache
-
getRemoveHits
@ManagedAttribute(description="Cluster wide total number of cache removal hits", displayName="Cluster wide total number of cache removal hits", measurementType=TRENDSUP) public long getRemoveHits()- Specified by:
getRemoveHitsin interfaceStats- Returns:
- Number of cache removal hits.
-
getRemoveMisses
@ManagedAttribute(description="Cluster wide total number of cache removals where keys were not found", displayName="Cluster wide total number of cache removal misses", measurementType=TRENDSUP) public long getRemoveMisses()- Specified by:
getRemoveMissesin interfaceStats- Returns:
- Number of cache removal misses.
-
getStores
@ManagedAttribute(description="Cluster wide total number of cache put operations", displayName="Cluster wide total number of cache puts", measurementType=TRENDSUP) public long getStores()
-
getTimeSinceStart
@ManagedAttribute(description="Number of seconds since the first cache node started", displayName="Number of seconds since the first cache node started", measurementType=TRENDSUP) public long getTimeSinceStart()- Specified by:
getTimeSinceStartin interfaceStats- Returns:
- Number of seconds since cache started.
-
getCurrentNumberOfEntries
public int getCurrentNumberOfEntries()
Description copied from interface:StatsReturns 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:
getCurrentNumberOfEntriesin interfaceStats- Returns:
- Number of entries currently in the cache, including passivated entries.
-
getTotalNumberOfEntries
public long getTotalNumberOfEntries()
Description copied from interface:StatsNumber of entries stored in cache since the cache started running.- Specified by:
getTotalNumberOfEntriesin interfaceStats
-
getDataMemoryUsed
@ManagedAttribute(description="Amount in bytes of memory used across the cluster for entries in this cache with eviction", displayName="Cluster wide memory used by eviction") public long getDataMemoryUsed()Description copied from interface:StatsProvides 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:
getDataMemoryUsedin interfaceStats- Returns:
- memory in use or 0 if memory eviction is not enabled
-
getOffHeapMemoryUsed
@ManagedAttribute(description="Amount in bytes of off-heap memory used across the cluster for this cache", displayName="Cluster wide off-heap memory used") public long getOffHeapMemoryUsed()Description copied from interface:StatsThe amount of off-heap memory used by this cache- Specified by:
getOffHeapMemoryUsedin interfaceStats- Returns:
-
getRetrievals
public long getRetrievals()
- Specified by:
getRetrievalsin interfaceStats- Returns:
- Number of get operations.
-
reset
public void reset()
Description copied from interface:StatsReset statistics- Specified by:
resetin interfaceStats- Overrides:
resetin classAbstractClusterStats
-
getNumberOfLocksAvailable
@ManagedAttribute(description="Total number of exclusive locks available in the cluster", displayName="Cluster wide total number of locks") public int getNumberOfLocksAvailable()- Specified by:
getNumberOfLocksAvailablein interfaceClusterCacheStats- Returns:
- the total number of exclusive locks available in the cluster
-
getNumberOfLocksHeld
@ManagedAttribute(description="Total number of locks held in the cluster", displayName="Cluster wide total number of locks held") public int getNumberOfLocksHeld()- Specified by:
getNumberOfLocksHeldin interfaceClusterCacheStats- Returns:
- the total number of exclusive locks held in the cluster
-
getInvalidations
@ManagedAttribute(description="The total number of invalidations in the cluster", displayName="Cluster wide total number of invalidations", measurementType=TRENDSUP) public long getInvalidations()- Specified by:
getInvalidationsin interfaceClusterCacheStats- Returns:
- the total number of invalidations in the cluster
-
getActivations
@ManagedAttribute(description="The total number of activations in the cluster", displayName="Cluster wide total number of activations", measurementType=TRENDSUP) public long getActivations()- Specified by:
getActivationsin interfaceClusterCacheStats- Returns:
- the total number of actiavtions in the cluster
-
getPassivations
@ManagedAttribute(description="The total number of passivations in the cluster", displayName="Cluster wide total number of passivations", measurementType=TRENDSUP) public long getPassivations()- Specified by:
getPassivationsin interfaceClusterCacheStats- Returns:
- the total number of passivations in the cluster
-
getCacheLoaderLoads
@ManagedAttribute(description="The total number of cacheloader load operations in the cluster", displayName="Cluster wide total number of cacheloader loads", measurementType=TRENDSUP) public long getCacheLoaderLoads()- Specified by:
getCacheLoaderLoadsin interfaceClusterCacheStats- Returns:
- the total number of cacheloader load operations in the cluster
-
getCacheLoaderMisses
@ManagedAttribute(description="The total number of cacheloader load misses in the cluster", displayName="Cluster wide total number of cacheloader misses", measurementType=TRENDSUP) public long getCacheLoaderMisses()- Specified by:
getCacheLoaderMissesin interfaceClusterCacheStats- Returns:
- the total number of cacheloader misses in the cluster
-
getStoreWrites
@ManagedAttribute(description="The total number of cachestore store operations in the cluster", displayName="Cluster wide total number of cachestore stores", measurementType=TRENDSUP) public long getStoreWrites()- Specified by:
getStoreWritesin 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
-
-