Class 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:
    Serialized Form
    • 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

      Constructors 
      Constructor Description
      HibernateJvmVCacheRegionFactory​(com.atlassian.cache.CacheManager atlassianCacheManager, net.sf.ehcache.CacheManager ehCacheManager, com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.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 Detail

      • HibernateJvmVCacheRegionFactory

        public HibernateJvmVCacheRegionFactory​(com.atlassian.cache.CacheManager atlassianCacheManager,
                                               net.sf.ehcache.CacheManager ehCacheManager,
                                               com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
        Since:
        8.6
    • Method Detail

      • 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 class org.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 interface org.hibernate.cache.spi.RegionFactory
        Overrides:
        buildQueryResultsRegion in class org.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 interface org.hibernate.cache.spi.RegionFactory
        Overrides:
        buildTimestampsRegion in class org.hibernate.cache.spi.support.RegionFactoryTemplate