/** * Returns the active configuration text for the input cacheName * * @param cacheName * @return Returns the active configuration text for the input cacheName * @throws CacheException if the cache with <code>cacheName</code> does not exist */ public String getActiveConfigurationText(String cacheName) throws CacheException { boolean decoratedCache = false; Ehcache cache = getCache(cacheName); if (cache == null) { cache = getEhcache(cacheName); decoratedCache = true; } CacheConfiguration actualConfig = cache != null ? cache.getCacheConfiguration() : null; if (actualConfig == null) { throw new CacheException("Cache with name '" + cacheName + "' does not exist"); } CacheConfiguration config = decoratedCache ? actualConfig.clone().name(cacheName) : actualConfig; return ConfigurationUtil.generateCacheConfigurationText(runtimeCfg.getConfiguration(), config); }
supportConfig.name(underlyingCache.getName() + "_" + getClass().getName() + "_refreshAheadSupport"); supportConfig = supportConfig.persistence(new PersistenceConfiguration().strategy(Strategy.NONE)); int activeSize = 2 * refreshAheadConfig.getBatchSize() * refreshAheadConfig.getNumberOfThreads();
decoratedCache = true; CacheConfiguration config = decoratedCache ? cache.getCacheConfiguration().clone().name(cacheName) : cache.getCacheConfiguration(); addChildElement(new CacheConfigurationElement(this, configuration, config));
/** * Returns the active configuration text for the input cacheName * * @param cacheName * @return Returns the active configuration text for the input cacheName * @throws CacheException if the cache with <code>cacheName</code> does not exist */ public String getActiveConfigurationText(String cacheName) throws CacheException { boolean decoratedCache = false; Ehcache cache = getCache(cacheName); if (cache == null) { cache = getEhcache(cacheName); decoratedCache = true; } CacheConfiguration actualConfig = cache != null ? cache.getCacheConfiguration() : null; if (actualConfig == null) { throw new CacheException("Cache with name '" + cacheName + "' does not exist"); } CacheConfiguration config = decoratedCache ? actualConfig.clone().name(cacheName) : actualConfig; return ConfigurationUtil.generateCacheConfigurationText(runtimeCfg.getConfiguration(), config); }
/** * Returns the active configuration text for the input cacheName * * @param cacheName * @return Returns the active configuration text for the input cacheName * @throws CacheException if the cache with <code>cacheName</code> does not exist */ public String getActiveConfigurationText(String cacheName) throws CacheException { boolean decoratedCache = false; Ehcache cache = getCache(cacheName); if (cache == null) { cache = getEhcache(cacheName); decoratedCache = true; } CacheConfiguration actualConfig = cache != null ? cache.getCacheConfiguration() : null; if (actualConfig == null) { throw new CacheException("Cache with name '" + cacheName + "' does not exist"); } CacheConfiguration config = decoratedCache ? actualConfig.clone().name(cacheName) : actualConfig; return ConfigurationUtil.generateCacheConfigurationText(runtimeCfg.getConfiguration(), config); }
/** * Returns the active configuration text for the input cacheName * * @param cacheName * @return Returns the active configuration text for the input cacheName * @throws CacheException if the cache with <code>cacheName</code> does not exist */ public String getActiveConfigurationText(String cacheName) throws CacheException { boolean decoratedCache = false; Ehcache cache = getCache(cacheName); if (cache == null) { cache = getEhcache(cacheName); decoratedCache = true; } CacheConfiguration actualConfig = cache != null ? cache.getCacheConfiguration() : null; if (actualConfig == null) { throw new CacheException("Cache with name '" + cacheName + "' does not exist"); } CacheConfiguration config = decoratedCache ? actualConfig.clone().name(cacheName) : actualConfig; return ConfigurationUtil.generateCacheConfigurationText(runtimeCfg.getConfiguration(), config); }
public DefaultCacheManagerProvider() { net.sf.ehcache.config.Configuration config = new net.sf.ehcache.config.Configuration(); config.setUpdateCheck(false); CacheConfiguration tokenCacheConfiguration = new CacheConfiguration(). maxEntriesLocalHeap(DEFAULT_MAX_CACHE_ENTRIES). name("tokenCache"). persistence(new PersistenceConfiguration().strategy(Strategy.NONE)); tokenCacheConfiguration.validateConfiguration(); config.addCache(tokenCacheConfiguration ); cacheManager = CacheManager.create(config); }
.name(name) .statistics(statisticsEnabled) .persistence(PERSISTENCE_CONFIGURATION);
supportConfig.name(underlyingCache.getName() + "_" + getClass().getName() + "_refreshAheadSupport"); supportConfig = supportConfig.persistence(new PersistenceConfiguration().strategy(Strategy.NONE)); int activeSize = 2 * refreshAheadConfig.getBatchSize() * refreshAheadConfig.getNumberOfThreads();
supportConfig.name(underlyingCache.getName() + "_" + getClass().getName() + "_refreshAheadSupport"); supportConfig = supportConfig.persistence(new PersistenceConfiguration().strategy(Strategy.NONE)); int activeSize = 2 * refreshAheadConfig.getBatchSize() * refreshAheadConfig.getNumberOfThreads();
decoratedCache = true; CacheConfiguration config = decoratedCache ? cache.getCacheConfiguration().clone().name(cacheName) : cache.getCacheConfiguration(); addChildElement(new CacheConfigurationElement(this, configuration, config));
decoratedCache = true; CacheConfiguration config = decoratedCache ? cache.getCacheConfiguration().clone().name(cacheName) : cache.getCacheConfiguration(); addChildElement(new CacheConfigurationElement(this, configuration, config));
decoratedCache = true; CacheConfiguration config = decoratedCache ? cache.getCacheConfiguration().clone().name(cacheName) : cache.getCacheConfiguration(); addChildElement(new CacheConfigurationElement(this, configuration, config));
new CacheConfiguration().name( getName() ).memoryStoreEvictionPolicy( getMemoryStoreEvictionPolicy() ).eternal( isEternal() ).timeToLiveSeconds( getTimeToLiveSeconds() ).timeToIdleSeconds(