Package org.infinispan.stats
Interface Stats
-
- All Superinterfaces:
org.infinispan.commons.dataconversion.internal.JsonSerialization
- All Known Subinterfaces:
CacheContainerStats
,ClusterCacheStats
public interface Stats extends org.infinispan.commons.dataconversion.internal.JsonSerialization
Stats.- Since:
- 4.0
- Author:
- Galder ZamarreƱo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description long
getApproximateEntries()
Returns the approximate number of entries in this cache that exist in memory or persistent storage.long
getApproximateEntriesInMemory()
The same asgetApproximateEntries()
, however passivated entries are not included.long
getApproximateEntriesUnique()
The same asgetApproximateEntries()
, however only entries owned as primary are counted.long
getAverageReadTime()
long
getAverageReadTimeNanos()
long
getAverageRemoveTime()
Deprecated.Since 14.0, please usegetAverageWriteTimeNanos()
instead.long
getAverageRemoveTimeNanos()
long
getAverageWriteTime()
Deprecated.Since 14.0, please usegetAverageReadTimeNanos()
instead.long
getAverageWriteTimeNanos()
int
getCurrentNumberOfEntries()
Deprecated.Since 14.0, please usegetApproximateEntries()
orgetApproximateEntriesUnique()
instead.int
getCurrentNumberOfEntriesInMemory()
Deprecated.Since 14.0, please usegetApproximateEntriesInMemory()
instead.long
getDataMemoryUsed()
Provides how much memory the current eviction algorithm estimates is in use for data.long
getEvictions()
long
getHits()
long
getMisses()
long
getOffHeapMemoryUsed()
The amount of off-heap memory used by this cache, or -1 if the cache stores data in the heap.long
getRemoveHits()
long
getRemoveMisses()
int
getRequiredMinimumNumberOfNodes()
long
getRetrievals()
long
getStores()
long
getTimeSinceReset()
long
getTimeSinceStart()
long
getTotalNumberOfEntries()
Deprecated.Since 13.0, please usegetStores()
insteadvoid
reset()
Reset statisticsvoid
setStatisticsEnabled(boolean enabled)
Enables or disables statistics at runtime.
-
-
-
Method Detail
-
getTimeSinceStart
long getTimeSinceStart()
- Returns:
- Number of seconds since cache started.
-
getTimeSinceReset
long getTimeSinceReset()
- Returns:
- Number of seconds since stats where reset
-
getApproximateEntries
long getApproximateEntries()
Returns the approximate number of entries in this cache that exist in memory or persistent storage. 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 communicate with other nodes to find out about data stored in the cluster and not available locally.- Returns:
- Number of entries currently in the cache, including passivated entries.
-
getApproximateEntriesInMemory
long getApproximateEntriesInMemory()
The same asgetApproximateEntries()
, however passivated entries are not included.
-
getApproximateEntriesUnique
long getApproximateEntriesUnique()
The same asgetApproximateEntries()
, however only entries owned as primary are counted. This is only different fromgetApproximateEntries()
only in distributed and replicated caches.
-
getCurrentNumberOfEntries
@Deprecated int getCurrentNumberOfEntries()
Deprecated.Since 14.0, please usegetApproximateEntries()
orgetApproximateEntriesUnique()
instead.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.- Returns:
- Number of entries currently in the cache, including passivated entries.
-
getCurrentNumberOfEntriesInMemory
@Deprecated int getCurrentNumberOfEntriesInMemory()
Deprecated.Since 14.0, please usegetApproximateEntriesInMemory()
instead.The same asgetCurrentNumberOfEntries()
, however passivated entries are not included.
-
getTotalNumberOfEntries
@Deprecated long getTotalNumberOfEntries()
Deprecated.Since 13.0, please usegetStores()
insteadNumber of entries stored in cache since the cache started running.
-
getOffHeapMemoryUsed
long getOffHeapMemoryUsed()
The amount of off-heap memory used by this cache, or -1 if the cache stores data in the heap.
-
getDataMemoryUsed
long getDataMemoryUsed()
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 -1.- Returns:
- memory in use or -1 if memory eviction is not enabled
-
getStores
long getStores()
- Returns:
- Number of entries stored in cache since start.
-
getRetrievals
long getRetrievals()
- Returns:
- Number of entries read from the cache since start.
-
getHits
long getHits()
- Returns:
- Number of cache get hits.
-
getMisses
long getMisses()
- Returns:
- Number of cache get misses.
-
getRemoveHits
long getRemoveHits()
- Returns:
- Number of cache removal hits.
-
getRemoveMisses
long getRemoveMisses()
- Returns:
- Number of cache removal misses.
-
getEvictions
long getEvictions()
- Returns:
- Number of cache eviction.
-
getAverageReadTime
long getAverageReadTime()
- Returns:
- Average number of milliseconds for a cache get on the cache
-
getAverageReadTimeNanos
long getAverageReadTimeNanos()
- Returns:
- Average number of nanoseconds for a cache get on the cache
-
getAverageWriteTime
@Deprecated long getAverageWriteTime()
Deprecated.Since 14.0, please usegetAverageReadTimeNanos()
instead.- Returns:
- Average number of milliseconds for a cache put on the cache
-
getAverageWriteTimeNanos
long getAverageWriteTimeNanos()
- Returns:
- Average number of milliseconds for a cache put on the cache
-
getAverageRemoveTime
@Deprecated long getAverageRemoveTime()
Deprecated.Since 14.0, please usegetAverageWriteTimeNanos()
instead.- Returns:
- Average number of milliseconds for a cache remove on the cache
-
getAverageRemoveTimeNanos
long getAverageRemoveTimeNanos()
- Returns:
- Average number of nanoseconds for a cache remove on the cache
-
getRequiredMinimumNumberOfNodes
int getRequiredMinimumNumberOfNodes()
- Returns:
- Required minimum number of nodes to guarantee data consistency
-
reset
void reset()
Reset statistics
-
setStatisticsEnabled
void setStatisticsEnabled(boolean enabled)
Enables or disables statistics at runtime.- Parameters:
enabled
- boolean indicating whether statistics should be enable or not
-
-