private void cacheEventListenerFactory(final Config conf) { if (conf.hasPath("class")) { cache.addCacheEventListenerFactory( newCacheEventListenerFactory(path + ".cacheEventListenerFactory", conf)); } else { each(conf, (name, c) -> cache.addCacheEventListenerFactory( newCacheEventListenerFactory(path + ".cacheEventListenerFactory" + name, c) )); } }
/** * @return this configuration instance * @see #addCacheEventListenerFactory(CacheEventListenerFactoryConfiguration) */ public final CacheConfiguration cacheEventListenerFactory(CacheEventListenerFactoryConfiguration factory) { addCacheEventListenerFactory(factory); return this; }
/** * @return this configuration instance * @see #addCacheEventListenerFactory(CacheEventListenerFactoryConfiguration) */ public final CacheConfiguration cacheEventListenerFactory(CacheEventListenerFactoryConfiguration factory) { addCacheEventListenerFactory(factory); return this; }
/** * @return this configuration instance * @see #addCacheEventListenerFactory(CacheEventListenerFactoryConfiguration) */ public final CacheConfiguration cacheEventListenerFactory(CacheEventListenerFactoryConfiguration factory) { addCacheEventListenerFactory(factory); return this; }
/** * @return this configuration instance * @see #addCacheEventListenerFactory(CacheEventListenerFactoryConfiguration) */ public final CacheConfiguration cacheEventListenerFactory(CacheEventListenerFactoryConfiguration factory) { addCacheEventListenerFactory(factory); return this; }
private void cacheEventListenerFactory(final Config conf) { if (conf.hasPath("class")) { cache.addCacheEventListenerFactory( newCacheEventListenerFactory(path + ".cacheEventListenerFactory", conf)); } else { each(conf, (name, c) -> cache.addCacheEventListenerFactory( newCacheEventListenerFactory(path + ".cacheEventListenerFactory" + name, c) )); } }
static CacheManager workAroundCache95(CacheManager ehCacheManager) { final CacheConfiguration defaultConfig = ehCacheManager.getConfiguration().getDefaultCacheConfiguration(); final CacheConfiguration.CacheEventListenerFactoryConfiguration listenerConfig = new CacheConfiguration.CacheEventListenerFactoryConfiguration() .className(NoopCacheEventListenerFactory.class.getName()); defaultConfig.clone().addCacheEventListenerFactory(listenerConfig); if (defaultConfig.getCacheEventListenerConfigurations().isEmpty()) { LOG.warn("It looks like CACHE-95 has been fixed. This workaround should be removed."); } else { LOG.debug("Working around CACHE-95"); } return ehCacheManager; }