public final class NoopCacheEventListenerFactory
extends net.sf.ehcache.event.CacheEventListenerFactory
Due to this bug, the first cache that registers a listener configuration pollutes the default configuration with that listener. As a result, every cache thereafter gets that listener factory, too. To prevent this, we explicitly give the default configuration a listener factory that will deliver a single no-op listener on every cache. This ensures that the default configuration has at least one listener, which in turn makes the listener configuration clone itself properly. The extra listener call on every cache notification is unlikely to be at all significant.
This is only public
because EhCache wants to instantiate a new one every time it creates a cache.
Awesome.
Constructor and Description |
---|
NoopCacheEventListenerFactory() |
Modifier and Type | Method and Description |
---|---|
net.sf.ehcache.event.CacheEventListener |
createCacheEventListener(Properties properties) |
static net.sf.ehcache.CacheManager |
workAroundCache95(net.sf.ehcache.CacheManager ehCacheManager) |
public static net.sf.ehcache.CacheManager workAroundCache95(net.sf.ehcache.CacheManager ehCacheManager)
public net.sf.ehcache.event.CacheEventListener createCacheEventListener(Properties properties)
createCacheEventListener
in class net.sf.ehcache.event.CacheEventListenerFactory
Copyright © 2002-2021 Atlassian. All Rights Reserved.