Package com.atlassian.jira
Class NoopCacheEventListenerFactory
java.lang.Object
net.sf.ehcache.event.CacheEventListenerFactory
com.atlassian.jira.NoopCacheEventListenerFactory
public final class NoopCacheEventListenerFactory
extends net.sf.ehcache.event.CacheEventListenerFactory
Work-around for CACHE-95 / EHC-1089.
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.
- Since:
- v6.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.sf.ehcache.event.CacheEventListenercreateCacheEventListener(Properties properties) static net.sf.ehcache.CacheManagerworkAroundCache95(net.sf.ehcache.CacheManager ehCacheManager)
-
Constructor Details
-
NoopCacheEventListenerFactory
public NoopCacheEventListenerFactory()
-
-
Method Details
-
workAroundCache95
public static net.sf.ehcache.CacheManager workAroundCache95(net.sf.ehcache.CacheManager ehCacheManager) -
createCacheEventListener
- Specified by:
createCacheEventListenerin classnet.sf.ehcache.event.CacheEventListenerFactory
-