private void init() { if (sizeOfPolicyConfiguration == null) { return; } addAttribute(new SimpleNodeAttribute("maxDepth", sizeOfPolicyConfiguration.getMaxDepth()) .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_SIZEOF_DEPTH)); addAttribute(new SimpleNodeAttribute("maxDepthExceededBehavior", sizeOfPolicyConfiguration.getMaxDepthExceededBehavior()) .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR)); }
/** * Helper method which resolves the max depth of a cache, using the cache manager's one if none was configured * on the cache itself. * * @param cache the cache from which to resolve the max depth * @return the resolved max depth */ public static int resolveMaxDepth(Ehcache cache) { if (cache == null) { return DEFAULT_MAX_SIZEOF_DEPTH; } CacheManager cacheManager = cache.getCacheManager(); return resolvePolicy(cacheManager == null ? null : cacheManager.getConfiguration(), cache.getCacheConfiguration()).getMaxDepth(); }
sizeOfPolicyConfiguration = getConfiguration().getSizeOfPolicyConfiguration(); return SizeOfEngineLoader.newSizeOfEngine(sizeOfPolicyConfiguration.getMaxDepth(), sizeOfPolicyConfiguration.getMaxDepthExceededBehavior().isAbort(), false);
@Override public Properties getProperties() { Configuration ec = cacheManager.getConfiguration(); Properties p = new Properties(); p.put("name", ec.getName()); p.put("source", ec.getConfigurationSource().toString()); p.put("timeoutSeconds", ec.getDefaultTransactionTimeoutInSeconds()); p.put("maxBytesDisk", ec.getMaxBytesLocalDisk()); p.put("maxBytesHeap", ec.getMaxBytesLocalHeap()); p.put("maxDepth", ec.getSizeOfPolicyConfiguration().getMaxDepth()); p.put("defaultCacheMaxEntries", ec.getDefaultCacheConfiguration().getMaxEntriesLocalHeap()); p.put("defaultCacheTimeToIdleSecs", ec.getDefaultCacheConfiguration().getTimeToIdleSeconds()); p.put("defaultCacheTimeToLiveSecs", ec.getDefaultCacheConfiguration().getTimeToLiveSeconds()); p.put("defaultCacheEternal", ec.getDefaultCacheConfiguration().isEternal()); return p; }
private void init() { if (sizeOfPolicyConfiguration == null) { return; } addAttribute(new SimpleNodeAttribute("maxDepth", sizeOfPolicyConfiguration.getMaxDepth()) .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_SIZEOF_DEPTH)); addAttribute(new SimpleNodeAttribute("maxDepthExceededBehavior", sizeOfPolicyConfiguration.getMaxDepthExceededBehavior()) .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR)); }
/** * Helper method which resolves the max depth of a cache, using the cache manager's one if none was configured * on the cache itself. * * @param cache the cache from which to resolve the max depth * @return the resolved max depth */ public static int resolveMaxDepth(Ehcache cache) { if (cache == null) { return DEFAULT_MAX_SIZEOF_DEPTH; } CacheManager cacheManager = cache.getCacheManager(); return resolvePolicy(cacheManager == null ? null : cacheManager.getConfiguration(), cache.getCacheConfiguration()).getMaxDepth(); }
private void init() { if (sizeOfPolicyConfiguration == null) { return; } addAttribute(new SimpleNodeAttribute("maxDepth", sizeOfPolicyConfiguration.getMaxDepth()) .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_SIZEOF_DEPTH)); addAttribute(new SimpleNodeAttribute("maxDepthExceededBehavior", sizeOfPolicyConfiguration.getMaxDepthExceededBehavior()) .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR)); }
/** * Helper method which resolves the max depth of a cache, using the cache manager's one if none was configured * on the cache itself. * * @param cache the cache from which to resolve the max depth * @return the resolved max depth */ public static int resolveMaxDepth(Ehcache cache) { if (cache == null) { return DEFAULT_MAX_SIZEOF_DEPTH; } CacheManager cacheManager = cache.getCacheManager(); return resolvePolicy(cacheManager == null ? null : cacheManager.getConfiguration(), cache.getCacheConfiguration()).getMaxDepth(); }
private void init() { if (sizeOfPolicyConfiguration == null) { return; } addAttribute(new SimpleNodeAttribute("maxDepth", sizeOfPolicyConfiguration.getMaxDepth()) .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_SIZEOF_DEPTH)); addAttribute(new SimpleNodeAttribute("maxDepthExceededBehavior", sizeOfPolicyConfiguration.getMaxDepthExceededBehavior()) .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR)); }
/** * Helper method which resolves the max depth of a cache, using the cache manager's one if none was configured * on the cache itself. * * @param cache the cache from which to resolve the max depth * @return the resolved max depth */ public static int resolveMaxDepth(Ehcache cache) { if (cache == null) { return DEFAULT_MAX_SIZEOF_DEPTH; } CacheManager cacheManager = cache.getCacheManager(); return resolvePolicy(cacheManager == null ? null : cacheManager.getConfiguration(), cache.getCacheConfiguration()).getMaxDepth(); }
sizeOfPolicyConfiguration = getConfiguration().getSizeOfPolicyConfiguration(); return SizeOfEngineLoader.newSizeOfEngine(sizeOfPolicyConfiguration.getMaxDepth(), sizeOfPolicyConfiguration.getMaxDepthExceededBehavior().isAbort(), false);
sizeOfPolicyConfiguration = getConfiguration().getSizeOfPolicyConfiguration(); return SizeOfEngineLoader.newSizeOfEngine(sizeOfPolicyConfiguration.getMaxDepth(), sizeOfPolicyConfiguration.getMaxDepthExceededBehavior().isAbort(), false);
sizeOfPolicyConfiguration.getMaxDepth(), sizeOfPolicyConfiguration.getMaxDepthExceededBehavior().isAbort());