Class HibernateJvmVCacheRegionFactory
java.lang.Object
org.hibernate.cache.spi.AbstractRegionFactory
org.hibernate.cache.spi.support.RegionFactoryTemplate
org.hibernate.cache.jcache.internal.JCacheRegionFactory
com.atlassian.confluence.impl.hibernate.HibernateJvmVCacheRegionFactory
- All Implemented Interfaces:
Serializable
,org.hibernate.cache.spi.RegionFactory
,org.hibernate.service.Service
,org.hibernate.service.spi.Stoppable
public class HibernateJvmVCacheRegionFactory
extends org.hibernate.cache.jcache.internal.JCacheRegionFactory
Basically an
JCacheRegionFactory
but shares an instance of EhCache CacheManager
with Atlassian CacheManager
.
Since Hibernate JCacheRegionFactory
interacts with EhCache CacheManager
directly, Confluence must
apply default configuration set in ehcache-settings-defaults.conf and/or cache-settings-overrides.properties for each cache region created here.- Since:
- 6.14
- See Also:
-
Field Summary
Fields inherited from class org.hibernate.cache.spi.AbstractRegionFactory
LEGACY_QUERY_RESULTS_REGION_UNQUALIFIED_NAMES, LEGACY_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAMES
Fields inherited from interface org.hibernate.cache.spi.RegionFactory
DEFAULT_QUERY_RESULTS_REGION_UNQUALIFIED_NAME, DEFAULT_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAME
-
Constructor Summary
ConstructorDescriptionHibernateJvmVCacheRegionFactory
(com.atlassian.cache.CacheManager atlassianCacheManager, net.sf.ehcache.CacheManager ehCacheManager, com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider) -
Method Summary
Modifier and TypeMethodDescriptionorg.hibernate.cache.spi.QueryResultsRegion
buildQueryResultsRegion
(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) org.hibernate.cache.spi.TimestampsRegion
buildTimestampsRegion
(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) protected javax.cache.CacheManager
resolveCacheManager
(org.hibernate.boot.spi.SessionFactoryOptions settings, Map properties) Bypass the superclass's JCache discovery mechanism, and give it the proxy we've wrapped around Ehcache.Methods inherited from class org.hibernate.cache.jcache.internal.JCacheRegionFactory
buildDomainDataRegion, cacheExists, createCache, createDomainDataStorageAccess, createQueryResultsRegionStorageAccess, createTimestampsRegionStorageAccess, defaultRegionName, getCacheManager, getCachingProvider, getClassLoader, getImplicitCacheKeysFactory, getOrCreateCache, getUri, isStarted, prepareForUse, releaseFromUse
Methods inherited from class org.hibernate.cache.spi.AbstractRegionFactory
createTransactionContext, getDefaultAccessType, getOptions, getTimeout, isMinimalPutsEnabledByDefault, nextTimestamp, qualify, start, stop, verifiedStartStatus, verifyStarted
-
Constructor Details
-
HibernateJvmVCacheRegionFactory
public HibernateJvmVCacheRegionFactory(com.atlassian.cache.CacheManager atlassianCacheManager, net.sf.ehcache.CacheManager ehCacheManager, com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider) - Since:
- 8.6
-
-
Method Details
-
resolveCacheManager
protected javax.cache.CacheManager resolveCacheManager(org.hibernate.boot.spi.SessionFactoryOptions settings, Map properties) Bypass the superclass's JCache discovery mechanism, and give it the proxy we've wrapped around Ehcache.- Overrides:
resolveCacheManager
in classorg.hibernate.cache.jcache.internal.JCacheRegionFactory
- Since:
- 8.6
-
buildQueryResultsRegion
public org.hibernate.cache.spi.QueryResultsRegion buildQueryResultsRegion(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) - Specified by:
buildQueryResultsRegion
in interfaceorg.hibernate.cache.spi.RegionFactory
- Overrides:
buildQueryResultsRegion
in classorg.hibernate.cache.spi.support.RegionFactoryTemplate
-
buildTimestampsRegion
public org.hibernate.cache.spi.TimestampsRegion buildTimestampsRegion(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) - Specified by:
buildTimestampsRegion
in interfaceorg.hibernate.cache.spi.RegionFactory
- Overrides:
buildTimestampsRegion
in classorg.hibernate.cache.spi.support.RegionFactoryTemplate
-