Class HibernateJvmVCacheRegionFactory

  • All Implemented Interfaces:
    Serializable, org.hibernate.cache.spi.RegionFactory, org.hibernate.service.Service

    public class HibernateJvmVCacheRegionFactory
    extends org.hibernate.cache.ehcache.EhCacheRegionFactory
    Basically an EhCacheRegionFactory but shares an instance of EhCache CacheManager with Atlassian CacheManager. Since Hibernate EhCacheRegionFactory 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 Detail

      • NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME

        public static final String NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME
        See Also:
        Constant Field Values
      • mbeanRegistrationHelper

        protected final org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper mbeanRegistrationHelper
      • manager

        protected volatile net.sf.ehcache.CacheManager manager
      • settings

        protected org.hibernate.boot.spi.SessionFactoryOptions settings
      • accessStrategyFactory

        protected final org.hibernate.cache.ehcache.internal.strategy.EhcacheAccessStrategyFactory accessStrategyFactory
    • Constructor Detail

      • HibernateJvmVCacheRegionFactory

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

      • stop

        public void stop()
        Specified by:
        stop in interface org.hibernate.cache.spi.RegionFactory
        Overrides:
        stop in class org.hibernate.cache.ehcache.EhCacheRegionFactory
      • buildEntityRegion

        public org.hibernate.cache.spi.EntityRegion buildEntityRegion​(String regionName,
                                                                      Properties properties,
                                                                      org.hibernate.cache.spi.CacheDataDescription metadata)
                                                               throws org.hibernate.cache.CacheException
        Specified by:
        buildEntityRegion in interface org.hibernate.cache.spi.RegionFactory
        Throws:
        org.hibernate.cache.CacheException
      • buildCollectionRegion

        public org.hibernate.cache.spi.CollectionRegion buildCollectionRegion​(String regionName,
                                                                              Properties configValues,
                                                                              org.hibernate.cache.spi.CacheDataDescription metadata)
                                                                       throws org.hibernate.cache.CacheException
        Specified by:
        buildCollectionRegion in interface org.hibernate.cache.spi.RegionFactory
        Throws:
        org.hibernate.cache.CacheException
      • buildQueryResultsRegion

        public org.hibernate.cache.spi.QueryResultsRegion buildQueryResultsRegion​(String regionName,
                                                                                  Properties properties)
                                                                           throws org.hibernate.cache.CacheException
        Specified by:
        buildQueryResultsRegion in interface org.hibernate.cache.spi.RegionFactory
        Throws:
        org.hibernate.cache.CacheException
      • buildTimestampsRegion

        public org.hibernate.cache.spi.TimestampsRegion buildTimestampsRegion​(String regionName,
                                                                              Properties properties)
                                                                       throws org.hibernate.cache.CacheException
        Specified by:
        buildTimestampsRegion in interface org.hibernate.cache.spi.RegionFactory
        Throws:
        org.hibernate.cache.CacheException
      • buildNaturalIdRegion

        public org.hibernate.cache.spi.NaturalIdRegion buildNaturalIdRegion​(String regionName,
                                                                            Properties properties,
                                                                            org.hibernate.cache.spi.CacheDataDescription metadata)
                                                                     throws org.hibernate.cache.CacheException
        Specified by:
        buildNaturalIdRegion in interface org.hibernate.cache.spi.RegionFactory
        Throws:
        org.hibernate.cache.CacheException
      • isMinimalPutsEnabledByDefault

        public boolean isMinimalPutsEnabledByDefault()
        Specified by:
        isMinimalPutsEnabledByDefault in interface org.hibernate.cache.spi.RegionFactory
      • nextTimestamp

        public long nextTimestamp()
        Specified by:
        nextTimestamp in interface org.hibernate.cache.spi.RegionFactory
      • setClassLoaderService

        public void setClassLoaderService​(org.hibernate.boot.registry.classloading.spi.ClassLoaderService arg0)
      • loadResource

        protected URL loadResource​(String arg0)
      • getDefaultAccessType

        public org.hibernate.cache.spi.access.AccessType getDefaultAccessType()
        Specified by:
        getDefaultAccessType in interface org.hibernate.cache.spi.RegionFactory