Class RedissonRegionFactory

java.lang.Object
org.hibernate.cache.spi.AbstractRegionFactory
org.hibernate.cache.spi.support.RegionFactoryTemplate
org.redisson.hibernate.RedissonRegionFactory
All Implemented Interfaces:
Serializable, org.hibernate.cache.spi.RegionFactory, org.hibernate.service.Service, org.hibernate.service.spi.Stoppable
Direct Known Subclasses:
JndiRedissonRegionFactory, RedissonRegionNativeFactory

public class RedissonRegionFactory extends org.hibernate.cache.spi.support.RegionFactoryTemplate
Hibernate Cache region factory based on Redisson. Creates own Redisson instance during region start.
Author:
Nikita Koksharov
See Also:
  • Field Details

  • Constructor Details

    • RedissonRegionFactory

      public RedissonRegionFactory()
  • Method Details

    • getImplicitCacheKeysFactory

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

      protected void prepareForUse(org.hibernate.boot.spi.SessionFactoryOptions settings, Map properties) throws org.hibernate.cache.CacheException
      Specified by:
      prepareForUse in class org.hibernate.cache.spi.AbstractRegionFactory
      Throws:
      org.hibernate.cache.CacheException
    • createRedissonClient

      protected RedissonClient createRedissonClient(org.hibernate.boot.registry.StandardServiceRegistry registry, Map properties)
    • releaseFromUse

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

      public boolean isMinimalPutsEnabledByDefault()
      Specified by:
      isMinimalPutsEnabledByDefault in interface org.hibernate.cache.spi.RegionFactory
      Overrides:
      isMinimalPutsEnabledByDefault in class org.hibernate.cache.spi.AbstractRegionFactory
    • getDefaultAccessType

      public org.hibernate.cache.spi.access.AccessType getDefaultAccessType()
      Specified by:
      getDefaultAccessType in interface org.hibernate.cache.spi.RegionFactory
      Overrides:
      getDefaultAccessType in class org.hibernate.cache.spi.AbstractRegionFactory
    • nextTimestamp

      public long nextTimestamp()
      Specified by:
      nextTimestamp in interface org.hibernate.cache.spi.RegionFactory
      Overrides:
      nextTimestamp in class org.hibernate.cache.spi.AbstractRegionFactory
    • 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
    • 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
    • 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
    • getCache

      protected RMapCache<Object,Object> getCache(String regionName, Map properties, String defaultKey)