Class AbstractHazelcastCacheRegionFactory

java.lang.Object
org.hibernate.cache.spi.AbstractRegionFactory
org.hibernate.cache.spi.support.RegionFactoryTemplate
com.hazelcast.hibernate.AbstractHazelcastCacheRegionFactory
All Implemented Interfaces:
Serializable, org.hibernate.cache.spi.RegionFactory, org.hibernate.service.Service, org.hibernate.service.spi.Stoppable
Direct Known Subclasses:
HazelcastCacheRegionFactory, HazelcastLocalCacheRegionFactory

public abstract class AbstractHazelcastCacheRegionFactory extends org.hibernate.cache.spi.support.RegionFactoryTemplate
Simple RegionFactory implementation to return Hazelcast based local Region implementations
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    protected com.hazelcast.core.HazelcastInstance
     
    protected final List<LocalRegionCache>
     

    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
     
    AbstractHazelcastCacheRegionFactory(com.hazelcast.hibernate.PhoneHomeService phoneHomeService)
     
    AbstractHazelcastCacheRegionFactory(org.hibernate.cache.spi.CacheKeysFactory cacheKeysFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.hibernate.cache.spi.DomainDataRegion
    buildDomainDataRegion(org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig, org.hibernate.cache.cfg.spi.DomainDataRegionBuildingContext buildingContext)
     
    protected org.hibernate.cache.spi.support.DomainDataStorageAccess
    createDomainDataStorageAccess(org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig, org.hibernate.cache.cfg.spi.DomainDataRegionBuildingContext buildingContext)
     
    protected org.hibernate.cache.spi.support.StorageAccess
    createQueryResultsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
     
    protected abstract RegionCache
    createRegionCache(String unqualifiedRegionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory, org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig)
     
    protected abstract RegionCache
    createTimestampsRegionCache(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
     
    protected org.hibernate.cache.spi.support.StorageAccess
    createTimestampsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
     
    com.hazelcast.core.HazelcastInstance
     
    protected org.hibernate.cache.spi.CacheKeysFactory
     
    protected boolean
     
    protected void
    prepareForUse(org.hibernate.boot.spi.SessionFactoryOptions settings, Map configValues)
     
    protected void
     

    Methods inherited from class org.hibernate.cache.spi.support.RegionFactoryTemplate

    buildQueryResultsRegion, buildTimestampsRegion

    Methods inherited from class org.hibernate.cache.spi.AbstractRegionFactory

    createTransactionContext, getDefaultAccessType, getOptions, getTimeout, isMinimalPutsEnabledByDefault, nextTimestamp, qualify, start, stop, verifiedStartStatus, verifyStarted

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • instance

      protected com.hazelcast.core.HazelcastInstance instance
    • localRegionCaches

      protected final List<LocalRegionCache> localRegionCaches
    • freeHeapBasedCacheEvictor

      protected final FreeHeapBasedCacheEvictor freeHeapBasedCacheEvictor
  • Constructor Details

    • AbstractHazelcastCacheRegionFactory

      public AbstractHazelcastCacheRegionFactory()
    • AbstractHazelcastCacheRegionFactory

      public AbstractHazelcastCacheRegionFactory(org.hibernate.cache.spi.CacheKeysFactory cacheKeysFactory)
    • AbstractHazelcastCacheRegionFactory

      public AbstractHazelcastCacheRegionFactory(com.hazelcast.hibernate.PhoneHomeService phoneHomeService)
  • Method Details

    • buildDomainDataRegion

      public org.hibernate.cache.spi.DomainDataRegion buildDomainDataRegion(org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig, org.hibernate.cache.cfg.spi.DomainDataRegionBuildingContext buildingContext)
      Specified by:
      buildDomainDataRegion in interface org.hibernate.cache.spi.RegionFactory
      Overrides:
      buildDomainDataRegion in class org.hibernate.cache.spi.support.RegionFactoryTemplate
    • getHazelcastInstance

      public com.hazelcast.core.HazelcastInstance getHazelcastInstance()
    • createDomainDataStorageAccess

      protected org.hibernate.cache.spi.support.DomainDataStorageAccess createDomainDataStorageAccess(org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig, org.hibernate.cache.cfg.spi.DomainDataRegionBuildingContext buildingContext)
      Overrides:
      createDomainDataStorageAccess in class org.hibernate.cache.spi.support.RegionFactoryTemplate
    • createQueryResultsRegionStorageAccess

      protected org.hibernate.cache.spi.support.StorageAccess createQueryResultsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
      Specified by:
      createQueryResultsRegionStorageAccess in class org.hibernate.cache.spi.support.RegionFactoryTemplate
    • createRegionCache

      protected abstract RegionCache createRegionCache(String unqualifiedRegionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory, org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig)
    • createTimestampsRegionStorageAccess

      protected org.hibernate.cache.spi.support.StorageAccess createTimestampsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
      Specified by:
      createTimestampsRegionStorageAccess in class org.hibernate.cache.spi.support.RegionFactoryTemplate
    • createTimestampsRegionCache

      protected abstract RegionCache createTimestampsRegionCache(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
    • getImplicitCacheKeysFactory

      protected org.hibernate.cache.spi.CacheKeysFactory getImplicitCacheKeysFactory()
      Overrides:
      getImplicitCacheKeysFactory in class org.hibernate.cache.spi.support.RegionFactoryTemplate
    • isStarted

      protected boolean isStarted()
      Overrides:
      isStarted in class org.hibernate.cache.spi.AbstractRegionFactory
    • prepareForUse

      protected void prepareForUse(org.hibernate.boot.spi.SessionFactoryOptions settings, Map configValues)
      Specified by:
      prepareForUse in class org.hibernate.cache.spi.AbstractRegionFactory
    • releaseFromUse

      protected void releaseFromUse()
      Specified by:
      releaseFromUse in class org.hibernate.cache.spi.AbstractRegionFactory