/** * Helper method which resolves the MaxDepthExceededBehavior 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 MaxDepthExceededBehavior * @return the resolved MaxDepthExceededBehavior */ public static MaxDepthExceededBehavior resolveBehavior(Ehcache cache) { if (cache == null) { return DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR; } CacheManager cacheManager = cache.getCacheManager(); if (cacheManager == null) { return resolvePolicy(null, cache.getCacheConfiguration()).getMaxDepthExceededBehavior(); } else { return resolvePolicy(cacheManager.getConfiguration(), cache.getCacheConfiguration()).getMaxDepthExceededBehavior(); } }
sizeOfPolicyConfiguration.getMaxDepthExceededBehavior().isAbort(), false);
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 MaxDepthExceededBehavior 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 MaxDepthExceededBehavior * @return the resolved MaxDepthExceededBehavior */ public static MaxDepthExceededBehavior resolveBehavior(Ehcache cache) { if (cache == null) { return DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR; } CacheManager cacheManager = cache.getCacheManager(); if (cacheManager == null) { return resolvePolicy(null, cache.getCacheConfiguration()).getMaxDepthExceededBehavior(); } else { return resolvePolicy(cacheManager.getConfiguration(), cache.getCacheConfiguration()).getMaxDepthExceededBehavior(); } }
/** * Helper method which resolves the MaxDepthExceededBehavior 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 MaxDepthExceededBehavior * @return the resolved MaxDepthExceededBehavior */ public static MaxDepthExceededBehavior resolveBehavior(Ehcache cache) { if (cache == null) { return DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR; } CacheManager cacheManager = cache.getCacheManager(); if (cacheManager == null) { return resolvePolicy(null, cache.getCacheConfiguration()).getMaxDepthExceededBehavior(); } else { return resolvePolicy(cacheManager.getConfiguration(), cache.getCacheConfiguration()).getMaxDepthExceededBehavior(); } }
/** * Helper method which resolves the MaxDepthExceededBehavior 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 MaxDepthExceededBehavior * @return the resolved MaxDepthExceededBehavior */ public static MaxDepthExceededBehavior resolveBehavior(Ehcache cache) { if (cache == null) { return DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR; } CacheManager cacheManager = cache.getCacheManager(); if (cacheManager == null) { return resolvePolicy(null, cache.getCacheConfiguration()).getMaxDepthExceededBehavior(); } else { return resolvePolicy(cacheManager.getConfiguration(), cache.getCacheConfiguration()).getMaxDepthExceededBehavior(); } }
sizeOfPolicyConfiguration.getMaxDepthExceededBehavior().isAbort(), false);
sizeOfPolicyConfiguration.getMaxDepthExceededBehavior().isAbort(), false);
sizeOfPolicyConfiguration.getMaxDepthExceededBehavior().isAbort());
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)); }
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)); }
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)); }