Class CacheContainerStatsImpl

    • Method Detail

      • start

        public void start()
      • setStatisticsEnabled

        public void setStatisticsEnabled​(boolean enabled)
        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
      • isStatisticsEnabled

        public boolean isStatisticsEnabled()
      • getAverageReadTime

        public long getAverageReadTime()
        Specified by:
        getAverageReadTime in interface Stats
        Returns:
        Average number of milliseconds for a cache get on the cache
      • calculateAverageReadTime

        protected long calculateAverageReadTime()
      • getAverageReadTimeNanos

        public long getAverageReadTimeNanos()
        Specified by:
        getAverageReadTimeNanos in interface Stats
        Returns:
        Average number of nanoseconds for a cache get on the cache
      • calculateAverageReadTimeNanos

        protected long calculateAverageReadTimeNanos()
      • getRequiredMinimumNumberOfNodes

        public int getRequiredMinimumNumberOfNodes()
        Specified by:
        getRequiredMinimumNumberOfNodes in interface Stats
        Returns:
        Required minimum number of nodes to guarantee data consistency
      • getAverageRemoveTime

        public long getAverageRemoveTime()
        Specified by:
        getAverageRemoveTime in interface Stats
        Returns:
        Average number of milliseconds for a cache remove on the cache
      • calculateAverageRemoveTime

        protected long calculateAverageRemoveTime()
      • getAverageRemoveTimeNanos

        public long getAverageRemoveTimeNanos()
        Specified by:
        getAverageRemoveTimeNanos in interface Stats
        Returns:
        Average number of nanoseconds for a cache remove on the cache
      • calculateAverageRemoveTimeNanos

        protected long calculateAverageRemoveTimeNanos()
      • getAverageWriteTime

        public long getAverageWriteTime()
        Specified by:
        getAverageWriteTime in interface Stats
        Returns:
        Average number of milliseconds for a cache put on the cache
      • calculateAverageWriteTime

        protected long calculateAverageWriteTime()
      • getAverageWriteTimeNanos

        public long getAverageWriteTimeNanos()
        Specified by:
        getAverageWriteTimeNanos in interface Stats
        Returns:
        Average number of milliseconds for a cache put on the cache
      • calculateAverageWriteTimeNanos

        protected long calculateAverageWriteTimeNanos()
      • getEvictions

        public long getEvictions()
        Specified by:
        getEvictions in interface Stats
        Returns:
        Number of cache eviction.
      • calculateEvictions

        protected long calculateEvictions()
      • getHits

        public long getHits()
        Specified by:
        getHits in interface Stats
        Returns:
        Number of cache get hits.
      • calculateHits

        protected long calculateHits()
      • calculateHitRatio

        protected double calculateHitRatio()
      • getMisses

        public long getMisses()
        Specified by:
        getMisses in interface Stats
        Returns:
        Number of cache get misses.
      • calculateMisses

        protected long calculateMisses()
      • getNumberOfEntries

        public int getNumberOfEntries()
      • calculateReadWriteRatio

        protected double calculateReadWriteRatio()
      • getRemoveHits

        public long getRemoveHits()
        Specified by:
        getRemoveHits in interface Stats
        Returns:
        Number of cache removal hits.
      • calculateRemoveHits

        protected long calculateRemoveHits()
      • getRemoveMisses

        public long getRemoveMisses()
        Specified by:
        getRemoveMisses in interface Stats
        Returns:
        Number of cache removal misses.
      • calculateRemoveMisses

        protected long calculateRemoveMisses()
      • getStores

        public long getStores()
        Specified by:
        getStores in interface Stats
        Returns:
        Number of put operations on the cache.
      • getTimeSinceReset

        public long getTimeSinceReset()
        Specified by:
        getTimeSinceReset in interface Stats
        Returns:
        Number of seconds since stats where reset
      • calculateStores

        protected long calculateStores()
      • getTimeSinceStart

        public long getTimeSinceStart()
        Specified by:
        getTimeSinceStart in interface Stats
        Returns:
        Number of seconds since cache started.
      • calculateTimeSinceStart

        protected long calculateTimeSinceStart()
      • 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 interface Stats
        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 interface Stats
      • 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 interface Stats
        Returns:
        memory in use or 0 if memory eviction is not enabled
      • calculateDataMemoryUsed

        protected long calculateDataMemoryUsed()
      • getOffHeapMemoryUsed

        public long getOffHeapMemoryUsed()
        Description copied from interface: Stats
        The amount of off-heap memory used by this cache
        Specified by:
        getOffHeapMemoryUsed in interface Stats
        Returns:
      • calculateOffHeapUsed

        protected long calculateOffHeapUsed()
      • getRetrievals

        public long getRetrievals()
        Specified by:
        getRetrievals in interface Stats
        Returns:
        Number of get operations.
      • reset

        public void reset()
        Description copied from interface: Stats
        Reset statistics
        Specified by:
        reset in interface Stats