@Test public void testGetRegionCacheOrphanEvictionPeriod() { assertThat(stats.getRegionCacheOrphanEvictionPeriod("sampleCache1"), is(-1)); }
public int getRegionCacheOrphanEvictionPeriod(String region) { Cache cache = this.cacheManager.getCache(region); if (cache != null && cache.isTerracottaClustered()) { return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEvictionPeriod(); } else { return -1; } }
EhcacheStatsImpl extends BaseEmitterBean implements EhcacheStats { public int getRegionCacheOrphanEvictionPeriod(String region) { Cache cache = this.cacheManager.getCache(region); if (cache != null && cache.isTerracottaClustered()) { return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEvictionPeriod(); } else { return -1; } } }
EhcacheStatsImpl extends BaseEmitterBean implements EhcacheStats { public int getRegionCacheOrphanEvictionPeriod(String region) { Cache cache = this.cacheManager.getCache(region); if (cache != null && cache.isTerracottaClustered()) { return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEvictionPeriod(); } else { return -1; } } EhcacheStatsImpl(CacheManager manager); }
EhcacheStatsImpl extends BaseEmitterBean implements EhcacheStats { public int getRegionCacheOrphanEvictionPeriod(String region) { Cache cache = this.cacheManager.getCache(region); if (cache != null && cache.isTerracottaClustered()) { return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEvictionPeriod(); } else { return -1; } } EhcacheStatsImpl(CacheManager manager); boolean isStatisticsEnabled(); void clearStats(); void disableStats(); void enableStats(); void flushRegionCache(String region); void flushRegionCaches(); String generateActiveConfigDeclaration(); String generateActiveConfigDeclaration(String region); long getCacheHitCount(); double getCacheHitRate(); long getCacheHitSample(); long getCacheMissCount(); double getCacheMissRate(); long getCacheMissSample(); long getCachePutCount(); double getCachePutRate(); long getCachePutSample(); String getOriginalConfigDeclaration(); String getOriginalConfigDeclaration(String region); Map<String, Map<String, Object>> getRegionCacheAttributes(); Map<String, Object> getRegionCacheAttributes(String regionName); int getRegionCacheMaxTTISeconds(String region); int getRegionCacheMaxTTLSeconds(String region); int getRegionCacheOrphanEvictionPeriod(String region); Map<String, int[]> getRegionCacheSamples(); int getRegionCacheTargetMaxInMemoryCount(String region); int getRegionCacheTargetMaxTotalCount(String region); String[] getTerracottaHibernateCacheRegionNames(); boolean isRegionCacheEnabled(String region); void setRegionCacheEnabled(String region, boolean enabled); boolean isRegionCachesEnabled(); void setRegionCachesEnabled(final boolean flag); boolean isRegionCacheLoggingEnabled(String region); boolean isRegionCacheOrphanEvictionEnabled(String region); boolean isTerracottaHibernateCache(String region); void setRegionCacheLoggingEnabled(String region, boolean loggingEnabled); void setRegionCacheMaxTTISeconds(String region, int maxTTISeconds); void setRegionCacheMaxTTLSeconds(String region, int maxTTLSeconds); void setRegionCacheTargetMaxInMemoryCount(String region, int targetMaxInMemoryCount); void setRegionCacheTargetMaxTotalCount(String region, int targetMaxTotalCount); int getNumberOfElementsInMemory(String region); int getNumberOfElementsOffHeap(String region); int getNumberOfElementsOnDisk(String region); void setStatisticsEnabled(boolean flag); long getMaxGetTimeMillis(); long getMinGetTimeMillis(); long getMaxGetTimeMillis(String cacheName); long getMinGetTimeMillis(String cacheName); float getAverageGetTimeMillis(String region); @Override MBeanNotificationInfo[] getNotificationInfo(); }
EhcacheStatsImpl extends BaseEmitterBean implements EhcacheStats { public int getRegionCacheOrphanEvictionPeriod(String region) { Cache cache = this.cacheManager.getCache(region); if (cache != null && cache.isTerracottaClustered()) { return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEvictionPeriod(); } else { return -1; } } EhcacheStatsImpl(CacheManager manager); boolean isStatisticsEnabled(); void clearStats(); void disableStats(); void enableStats(); void flushRegionCache(String region); void flushRegionCaches(); String generateActiveConfigDeclaration(); String generateActiveConfigDeclaration(String region); long getCacheHitCount(); double getCacheHitRate(); long getCacheHitSample(); long getCacheMissCount(); double getCacheMissRate(); long getCacheMissSample(); long getCachePutCount(); double getCachePutRate(); long getCachePutSample(); String getOriginalConfigDeclaration(); String getOriginalConfigDeclaration(String region); Map<String, Map<String, Object>> getRegionCacheAttributes(); Map<String, Object> getRegionCacheAttributes(String regionName); int getRegionCacheMaxTTISeconds(String region); int getRegionCacheMaxTTLSeconds(String region); int getRegionCacheOrphanEvictionPeriod(String region); Map<String, int[]> getRegionCacheSamples(); int getRegionCacheTargetMaxInMemoryCount(String region); int getRegionCacheTargetMaxTotalCount(String region); String[] getTerracottaHibernateCacheRegionNames(); boolean isRegionCacheEnabled(String region); void setRegionCacheEnabled(String region, boolean enabled); boolean isRegionCachesEnabled(); void setRegionCachesEnabled(final boolean flag); boolean isRegionCacheLoggingEnabled(String region); boolean isRegionCacheOrphanEvictionEnabled(String region); boolean isTerracottaHibernateCache(String region); void setRegionCacheLoggingEnabled(String region, boolean loggingEnabled); void setRegionCacheMaxTTISeconds(String region, int maxTTISeconds); void setRegionCacheMaxTTLSeconds(String region, int maxTTLSeconds); void setRegionCacheTargetMaxInMemoryCount(String region, int targetMaxInMemoryCount); void setRegionCacheTargetMaxTotalCount(String region, int targetMaxTotalCount); int getNumberOfElementsInMemory(String region); int getNumberOfElementsOffHeap(String region); int getNumberOfElementsOnDisk(String region); void setStatisticsEnabled(boolean flag); long getMaxGetTimeMillis(); long getMinGetTimeMillis(); long getMaxGetTimeMillis(String cacheName); long getMinGetTimeMillis(String cacheName); float getAverageGetTimeMillis(String region); @Override MBeanNotificationInfo[] getNotificationInfo();  }