Class CacheContainerStatsImpl

java.lang.Object
org.infinispan.stats.impl.CacheContainerStatsImpl
All Implemented Interfaces:
JsonSerialization, JmxStatisticsExposer, CacheContainerStats, Stats

@MBean(objectName="CacheContainerStats", description="General cache container statistics such as timings, hit/miss ratio, etc. for a single node.") @Deprecated(forRemoval=true) public class CacheContainerStatsImpl extends Object implements CacheContainerStats, JmxStatisticsExposer
Deprecated, for removal: This API element is subject to removal in a future version.
Since 10.1.3. This mixes statistics across unrelated caches so the reported numbers don't have too much relevance. Please use Stats or ClusterCacheStats instead.
Cache container statistics needed for admin console
Since:
7.1
Author:
Vladimir Blagojevic
  • Field Summary

    Fields inherited from interface org.infinispan.stats.CacheContainerStats

    OBJECT_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the approximate number of entries in this cache that exist in memory or persistent storage.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    The same as Stats.getApproximateEntries(), however passivated entries are not included.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    The same as Stats.getApproximateEntries(), however only entries owned as primary are counted.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the number of entries currently in this cache instance.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    The same as Stats.getCurrentNumberOfEntries(), however passivated entries are not included.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Provides how much memory the current eviction algorithm estimates is in use for data.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    The amount of off-heap memory used by this cache, or -1 if the cache stores data in the heap.
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns whether an interceptor's statistics are being captured.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reset statistics
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Resets an interceptor's cache statistics
    void
    setStatisticsEnabled(boolean enabled)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enables or disables statistics at runtime.
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CacheContainerStatsImpl

      public CacheContainerStatsImpl(EmbeddedCacheManager cm)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • setStatisticsEnabled

      public void setStatisticsEnabled(boolean enabled)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Stats
      Enables or disables statistics at runtime.
      Specified by:
      setStatisticsEnabled in interface JmxStatisticsExposer
      Specified by:
      setStatisticsEnabled in interface Stats
      Parameters:
      enabled - boolean indicating whether statistics should be enable or not
    • getStatisticsEnabled

      public boolean getStatisticsEnabled()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: JmxStatisticsExposer
      Returns whether an interceptor's statistics are being captured.
      Specified by:
      getStatisticsEnabled in interface JmxStatisticsExposer
      Returns:
      true if statistics are captured
    • resetStatistics

      public void resetStatistics()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: JmxStatisticsExposer
      Resets an interceptor's cache statistics
      Specified by:
      resetStatistics in interface JmxStatisticsExposer
    • isStatisticsEnabled

      @ManagedAttribute(description="Enables or disables the gathering of statistics by this component", displayName="Statistics enabled", dataType=TRAIT, writable=true) public boolean isStatisticsEnabled()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getAverageReadTime

      @ManagedAttribute(description="Cache container total average number of milliseconds for all read operation in this cache container", displayName="Cache container total average read time", units=MILLISECONDS) public long getAverageReadTime()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAverageReadTime in interface Stats
      Returns:
      Average number of milliseconds for a cache get on the cache
    • getAverageReadTimeNanos

      @ManagedAttribute(description="Cache container total average number of nanoseconds for all read operation in this cache container", displayName="Cache container total average read time (ns)", units=NANOSECONDS) public long getAverageReadTimeNanos()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAverageReadTimeNanos in interface Stats
      Returns:
      Average number of nanoseconds for a cache get 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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getRequiredMinimumNumberOfNodes in interface Stats
      Returns:
      Required minimum number of nodes to guarantee data consistency
    • getAverageRemoveTime

      @ManagedAttribute(description="Cache container total average number of milliseconds for all remove operation in this cache container", displayName="Cache container total average remove time", units=MILLISECONDS) public long getAverageRemoveTime()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAverageRemoveTime in interface Stats
      Returns:
      Average number of milliseconds for a cache remove on the cache
    • getAverageRemoveTimeNanos

      @ManagedAttribute(description="Cache container total average number of nanoseconds for all remove operation in this cache container", displayName="Cache container total average remove time (ns)", units=NANOSECONDS) public long getAverageRemoveTimeNanos()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAverageRemoveTimeNanos in interface Stats
      Returns:
      Average number of nanoseconds for a cache remove on the cache
    • getAverageWriteTime

      @ManagedAttribute(description="Cache container average number of milliseconds for all write operation in this cache container", displayName="Cache container average write time", units=MILLISECONDS) public long getAverageWriteTime()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAverageWriteTime in interface Stats
      Returns:
      Average number of milliseconds for a cache put on the cache
    • getAverageWriteTimeNanos

      @ManagedAttribute(description="Cache container average number of nanoseconds for all write operation in this cache container", displayName="Cache container average write time (ns)", units=MILLISECONDS) public long getAverageWriteTimeNanos()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAverageWriteTimeNanos in interface Stats
      Returns:
      Average number of milliseconds for a cache put on the cache
    • getEvictions

      @ManagedAttribute(description="Cache container total number of cache eviction operations", displayName="Cache container total number of cache evictions", measurementType=TRENDSUP) public long getEvictions()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getEvictions in interface Stats
      Returns:
      Number of cache eviction.
    • getHits

      @ManagedAttribute(description="Cache container total number of cache attribute hits", displayName="Cache container total number of cache hits", measurementType=TRENDSUP) public long getHits()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getHits in interface Stats
      Returns:
      Number of cache get hits.
    • getHitRatio

      @ManagedAttribute(description="Cache container total percentage hit/(hit+miss) ratio for this cache", displayName="Cache container total hit ratio", units=PERCENTAGE) public double getHitRatio()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getHitRatio in interface CacheContainerStats
    • getMisses

      @ManagedAttribute(description="Cache container total number of cache attribute misses", displayName="Cache container total number of cache misses", measurementType=TRENDSUP) public long getMisses()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getMisses in interface Stats
      Returns:
      Number of cache get misses.
    • getNumberOfEntries

      @ManagedAttribute(description="Cache container total number of entries currently in all caches from this cache container", displayName="Cache container total number of all cache entries") public int getNumberOfEntries()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCurrentNumberOfEntriesInMemory

      @ManagedAttribute(description="Cache container total number of entries currently in-memory for all caches in this cache container", displayName="Cache container total number of in-memory cache entries") public int getCurrentNumberOfEntriesInMemory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Stats
      The same as Stats.getCurrentNumberOfEntries(), however passivated entries are not included.
      Specified by:
      getCurrentNumberOfEntriesInMemory in interface Stats
    • getReadWriteRatio

      @ManagedAttribute(description="Cache container read/writes ratio in all caches from this cache container", displayName="Cache container read/write ratio", units=PERCENTAGE) public double getReadWriteRatio()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getReadWriteRatio in interface CacheContainerStats
    • getRemoveHits

      @ManagedAttribute(description="Cache container total number of cache removal hits", displayName="Cache container total number of cache removal hits", measurementType=TRENDSUP) public long getRemoveHits()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getRemoveHits in interface Stats
      Returns:
      Number of cache removal hits.
    • getRemoveMisses

      @ManagedAttribute(description="Cache container total number of cache removals where keys were not found", displayName="Cache container total number of cache removal misses", measurementType=TRENDSUP) public long getRemoveMisses()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getRemoveMisses in interface Stats
      Returns:
      Number of cache removal misses.
    • getStores

      @ManagedAttribute(description="Cache container total number of cache put operations", displayName="Cache container total number of cache puts", measurementType=TRENDSUP) public long getStores()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getStores in interface Stats
      Returns:
      Number of entries stored in cache since start.
    • getTimeSinceReset

      @ManagedAttribute(description="Number of seconds since the cache container statistics were last reset", displayName="Seconds since cache container statistics were reset", units=SECONDS) public long getTimeSinceReset()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getTimeSinceReset in interface Stats
      Returns:
      Number of seconds since stats where reset
    • getApproximateEntries

      public long getApproximateEntries()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Stats
      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.
      Specified by:
      getApproximateEntries in interface Stats
      Returns:
      Number of entries currently in the cache, including passivated entries.
    • getApproximateEntriesInMemory

      public long getApproximateEntriesInMemory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Stats
      The same as Stats.getApproximateEntries(), however passivated entries are not included.
      Specified by:
      getApproximateEntriesInMemory in interface Stats
    • getApproximateEntriesUnique

      public long getApproximateEntriesUnique()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Stats
      The same as Stats.getApproximateEntries(), however only entries owned as primary are counted. This is only different from Stats.getApproximateEntries() only in distributed and replicated caches.
      Specified by:
      getApproximateEntriesUnique in interface Stats
    • getTimeSinceStart

      @ManagedAttribute(description="Number of seconds since cache started", displayName="Seconds since cache started", units=SECONDS, measurementType=TRENDSUP) public long getTimeSinceStart()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getTimeSinceStart in interface Stats
      Returns:
      Number of seconds since cache started.
    • getCurrentNumberOfEntries

      public int getCurrentNumberOfEntries()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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 interface Stats
      Returns:
      Number of entries currently in the cache, including passivated entries.
    • getTotalNumberOfEntries

      @Deprecated(forRemoval=true) public long getTotalNumberOfEntries()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Stats
      Number of entries stored in cache since the cache started running.
      Specified by:
      getTotalNumberOfEntries in interface Stats
    • getDataMemoryUsed

      @ManagedAttribute(description="Amount in bytes of memory used in a given cache container for entries with eviction", displayName="Container memory used by eviction") public long getDataMemoryUsed()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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 -1.
      Specified by:
      getDataMemoryUsed in interface Stats
      Returns:
      memory in use or -1 if memory eviction is not enabled
    • getOffHeapMemoryUsed

      @ManagedAttribute(description="Amount in bytes of off-heap memory used by this cache container", displayName="Off-Heap memory used") public long getOffHeapMemoryUsed()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Stats
      The amount of off-heap memory used by this cache, or -1 if the cache stores data in the heap.
      Specified by:
      getOffHeapMemoryUsed in interface Stats
    • getRetrievals

      public long getRetrievals()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getRetrievals in interface Stats
      Returns:
      Number of entries read from the cache since start.
    • reset

      public void reset()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Stats
      Reset statistics
      Specified by:
      reset in interface Stats
    • toJson

      public Json toJson()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      toJson in interface JsonSerialization
      Specified by:
      toJson in interface Stats