Class EhcacheStatsImpl

    • Constructor Detail

      • EhcacheStatsImpl

        public EhcacheStatsImpl​(CacheManager manager)
                         throws javax.management.NotCompliantMBeanException
        Constructor accepting the backing CacheManager
        Throws:
        javax.management.NotCompliantMBeanException
    • Method Detail

      • flushRegionCache

        public void flushRegionCache​(java.lang.String region)
        Flushes the cache for the input region
        Specified by:
        flushRegionCache in interface EhcacheStats
      • flushRegionCaches

        public void flushRegionCaches()
        Flushes all the caches for all the regions
        Specified by:
        flushRegionCaches in interface EhcacheStats
      • generateActiveConfigDeclaration

        public java.lang.String generateActiveConfigDeclaration()
        Returns the currently active cache configuration
        Specified by:
        generateActiveConfigDeclaration in interface EhcacheStats
        Returns:
        the currently active cache configuration
      • generateActiveConfigDeclaration

        public java.lang.String generateActiveConfigDeclaration​(java.lang.String region)
        Returns the currently active cache configuration for the supplied region
        Specified by:
        generateActiveConfigDeclaration in interface EhcacheStats
        Returns:
        Returns the currently active cache configuration for the supplied region
      • getCacheHitCount

        public long getCacheHitCount()
        Returns hit count for all the caches
        Specified by:
        getCacheHitCount in interface EhcacheStats
        Returns:
        Returns hit count for all the caches
      • getCacheHitRate

        public double getCacheHitRate()
        Returns hit rate for all the caches
        Specified by:
        getCacheHitRate in interface EhcacheStats
        Returns:
        Returns hit rate for all the caches
      • getCacheHitSample

        public long getCacheHitSample()
        Returns hit count sample for all the caches
        Specified by:
        getCacheHitSample in interface EhcacheStats
        Returns:
        Returns hit count sample for all the caches
      • getCacheMissCount

        public long getCacheMissCount()
        Returns miss count for all the caches
        Specified by:
        getCacheMissCount in interface EhcacheStats
        Returns:
        Returns miss count for all the caches
      • getCacheMissRate

        public double getCacheMissRate()
        Returns miss rate for all the caches
        Specified by:
        getCacheMissRate in interface EhcacheStats
        Returns:
        Returns miss rate for all the caches
      • getCacheMissSample

        public long getCacheMissSample()
        Returns miss count sample for all the caches
        Specified by:
        getCacheMissSample in interface EhcacheStats
        Returns:
        Returns miss count sample for all the caches
      • getCachePutCount

        public long getCachePutCount()
        Returns put count for all the caches
        Specified by:
        getCachePutCount in interface EhcacheStats
        Returns:
        Returns put count for all the caches
      • getCachePutRate

        public double getCachePutRate()
        Returns put rate for all the caches
        Specified by:
        getCachePutRate in interface EhcacheStats
        Returns:
        Returns put rate for all the caches
      • getCachePutSample

        public long getCachePutSample()
        Returns put count sample for all the caches
        Specified by:
        getCachePutSample in interface EhcacheStats
        Returns:
        Returns put count sample for all the caches
      • getOriginalConfigDeclaration

        public java.lang.String getOriginalConfigDeclaration()
        Get the original cache configuration
        Specified by:
        getOriginalConfigDeclaration in interface EhcacheStats
        Returns:
        the original cache configuration
      • getOriginalConfigDeclaration

        public java.lang.String getOriginalConfigDeclaration​(java.lang.String region)
        Returns the original cache configuration for the supplied region
        Specified by:
        getOriginalConfigDeclaration in interface EhcacheStats
        Parameters:
        region - for which the configuration is required
        Returns:
        the original cache configuration for the supplied region
      • getRegionCacheAttributes

        public java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Object>> getRegionCacheAttributes()
        Returns a map containing mapping of all cache region names to their attributes
        Specified by:
        getRegionCacheAttributes in interface EhcacheStats
        Returns:
        Returns a map containing mapping of all cache region names to their attributes
      • getRegionCacheAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getRegionCacheAttributes​(java.lang.String regionName)
        Returns a map containing attributes of the cache for the input cache region name
        Specified by:
        getRegionCacheAttributes in interface EhcacheStats
        Returns:
        Returns a map containing attributes of the cache for the input cache region name
      • getRegionCacheMaxTTISeconds

        public int getRegionCacheMaxTTISeconds​(java.lang.String region)
        Returns the time to idle for the input cache region
        Specified by:
        getRegionCacheMaxTTISeconds in interface EhcacheStats
        Returns:
        Returns the time to live for the input cache region
      • getRegionCacheMaxTTLSeconds

        public int getRegionCacheMaxTTLSeconds​(java.lang.String region)
        Returns the time to live for the input cache region
        Specified by:
        getRegionCacheMaxTTLSeconds in interface EhcacheStats
        Returns:
        Returns the time to live for the input cache region
      • getRegionCacheOrphanEvictionPeriod

        public int getRegionCacheOrphanEvictionPeriod​(java.lang.String region)
        Returns the orphan eviction period for the input cache region.
        Specified by:
        getRegionCacheOrphanEvictionPeriod in interface EhcacheStats
        Returns:
        Returns the orphan eviction period for the input cache region.
      • getRegionCacheSamples

        public java.util.Map<java.lang.String,​int[]> getRegionCacheSamples()
        Returns a map containing mapping between cache names and an array containing hit, miss and put count samples
        Specified by:
        getRegionCacheSamples in interface EhcacheStats
        Returns:
        Returns a map containing mapping between cache names and an array containing hit, miss and put count samples
      • getRegionCacheTargetMaxInMemoryCount

        public int getRegionCacheTargetMaxInMemoryCount​(java.lang.String region)
        Returns the maxElementsInMemory of the input cache region
        Specified by:
        getRegionCacheTargetMaxInMemoryCount in interface EhcacheStats
        Returns:
        Returns the maxElementsInMemory of the input cache region
      • getRegionCacheTargetMaxTotalCount

        public int getRegionCacheTargetMaxTotalCount​(java.lang.String region)
        Returns the maxElementsOnDisk of the input cache region
        Specified by:
        getRegionCacheTargetMaxTotalCount in interface EhcacheStats
        Returns:
        Returns the maxElementsOnDisk of the input cache region
      • getTerracottaHibernateCacheRegionNames

        public java.lang.String[] getTerracottaHibernateCacheRegionNames()
        Returns the region names which are clustered with terracotta
        Specified by:
        getTerracottaHibernateCacheRegionNames in interface EhcacheStats
        Returns:
        Returns the region names which are clustered with terracotta
      • isRegionCacheEnabled

        public boolean isRegionCacheEnabled​(java.lang.String region)
        Returns true if cache is enabled for the input region
        Specified by:
        isRegionCacheEnabled in interface EhcacheStats
        Returns:
        Returns true if cache is enabled for the input region
      • setRegionCacheEnabled

        public void setRegionCacheEnabled​(java.lang.String region,
                                          boolean enabled)
        Enables/disables a particular region
        Specified by:
        setRegionCacheEnabled in interface EhcacheStats
      • isRegionCachesEnabled

        public boolean isRegionCachesEnabled()
        Returns true if all the cache regions are enabled. If even one cache is disabled, it will return false
        Specified by:
        isRegionCachesEnabled in interface EhcacheStats
        Returns:
        Returns true if all the cache regions are enabled. If even one cache is disabled, it will return false
      • isRegionCacheLoggingEnabled

        public boolean isRegionCacheLoggingEnabled​(java.lang.String region)
        Returns true if logging is enabled for the input cache region
        Specified by:
        isRegionCacheLoggingEnabled in interface EhcacheStats
        Returns:
        Returns true if logging is enabled for the input cache region
      • isRegionCacheOrphanEvictionEnabled

        public boolean isRegionCacheOrphanEvictionEnabled​(java.lang.String region)
        Returns true if orphan eviction is enabled for the region otherwise false
        Specified by:
        isRegionCacheOrphanEvictionEnabled in interface EhcacheStats
        Returns:
        Returns true if orphan eviction is enabled for the region otherwise false
      • isTerracottaHibernateCache

        public boolean isTerracottaHibernateCache​(java.lang.String region)
        Returns true if the input region is clustered with terracotta
        Specified by:
        isTerracottaHibernateCache in interface EhcacheStats
        Returns:
        Returns true if the input region is clustered with terracotta
      • setRegionCacheLoggingEnabled

        public void setRegionCacheLoggingEnabled​(java.lang.String region,
                                                 boolean loggingEnabled)
        Enable/Disable logging for the input cache region
        Specified by:
        setRegionCacheLoggingEnabled in interface EhcacheStats
      • setRegionCacheMaxTTISeconds

        public void setRegionCacheMaxTTISeconds​(java.lang.String region,
                                                int maxTTISeconds)
        Sets the time to idle for the input cache region
        Specified by:
        setRegionCacheMaxTTISeconds in interface EhcacheStats
        maxTTISeconds - Returns the time to idle for the input cache region
      • setRegionCacheMaxTTLSeconds

        public void setRegionCacheMaxTTLSeconds​(java.lang.String region,
                                                int maxTTLSeconds)
        Sets the time to live for the input cache region
        Specified by:
        setRegionCacheMaxTTLSeconds in interface EhcacheStats
      • setRegionCacheTargetMaxInMemoryCount

        public void setRegionCacheTargetMaxInMemoryCount​(java.lang.String region,
                                                         int targetMaxInMemoryCount)
        Sets the maxElementsInMemory of the input cache region
        Specified by:
        setRegionCacheTargetMaxInMemoryCount in interface EhcacheStats
      • setRegionCacheTargetMaxTotalCount

        public void setRegionCacheTargetMaxTotalCount​(java.lang.String region,
                                                      int targetMaxTotalCount)
        Sets the maxElementsOnDisk of the input cache region
        Specified by:
        setRegionCacheTargetMaxTotalCount in interface EhcacheStats
      • getMaxGetTimeMillis

        public long getMaxGetTimeMillis()
        Return maximum time taken in milliseconds for a get operation
        Specified by:
        getMaxGetTimeMillis in interface EhcacheStats
        Returns:
        Return maximum time taken in milliseconds for a get operation
      • getMinGetTimeMillis

        public long getMinGetTimeMillis()
        Return minimum time taken for a get operation in the cache in milliseconds
        Specified by:
        getMinGetTimeMillis in interface EhcacheStats
        Returns:
        minimum time taken for a get operation in the cache in milliseconds
      • doDispose

        protected void doDispose()
        Dispose callback of subclasses
        Specified by:
        doDispose in class BaseEmitterBean