public class EhCacheProvider
extends org.hibernate.cache.ehcache.EhCacheRegionFactory
EhCacheRegionFactory
, part of the hibernate-ehcache
module, which extracts
the CacheManager
from properties provided to the constructor rather than initialising one on the fly.
This class requires that the ConfigurableLocalSessionFactoryBean
be used to create the Hibernate
SessionFactory
, as there is currently no other way to get the CacheManager
set as the required
property in order to be pulled out by the constructor. Long term, Crowd needs to move away from this approach as
it is not very compatible with how Hibernate deals with caching.
Modifier and Type | Field and Description |
---|---|
protected org.hibernate.cache.ehcache.internal.strategy.EhcacheAccessStrategyFactory |
accessStrategyFactory |
protected net.sf.ehcache.CacheManager |
manager |
protected org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper |
mbeanRegistrationHelper |
static String |
NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME |
static String |
PROP_CACHE_MANAGER |
protected org.hibernate.cfg.Settings |
settings |
Constructor and Description |
---|
EhCacheProvider(Properties properties) |
Modifier and Type | Method and Description |
---|---|
protected URL |
loadResource(String arg0) |
void |
start(org.hibernate.cfg.Settings settings,
Properties properties)
Suppresses the initialisation for the
CacheManager that happens in the base class; the cache manager
is provided to the constructor of this region factory, so it doesn't need to be initialised here. |
public static final String PROP_CACHE_MANAGER
public static final String NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME
protected final org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper mbeanRegistrationHelper
protected volatile net.sf.ehcache.CacheManager manager
protected org.hibernate.cfg.Settings settings
protected final org.hibernate.cache.ehcache.internal.strategy.EhcacheAccessStrategyFactory accessStrategyFactory
public EhCacheProvider(Properties properties)
public void start(org.hibernate.cfg.Settings settings, Properties properties)
CacheManager
that happens in the base class; the cache manager
is provided to the constructor of this region factory, so it doesn't need to be initialised here.start
in interface org.hibernate.cache.spi.RegionFactory
start
in class org.hibernate.cache.ehcache.EhCacheRegionFactory
settings
- ignoredproperties
- ignoredCopyright © 2016 Atlassian. All rights reserved.