Class RedissonRegionFactory

  • All Implemented Interfaces:
    Serializable, org.hibernate.cache.spi.RegionFactory, org.hibernate.service.Service
    Direct Known Subclasses:
    JndiRedissonRegionFactory

    public class RedissonRegionFactory
    extends Object
    implements org.hibernate.cache.spi.RegionFactory
    Hibernate Cache region factory based on Redisson. Creates own Redisson instance during region start.
    Author:
    Nikita Koksharov
    See Also:
    Serialized Form
    • Constructor Detail

      • RedissonRegionFactory

        public RedissonRegionFactory()
    • Method Detail

      • start

        public void start​(org.hibernate.boot.spi.SessionFactoryOptions settings,
                          Properties properties)
                   throws org.hibernate.cache.CacheException
        Specified by:
        start in interface org.hibernate.cache.spi.RegionFactory
        Throws:
        org.hibernate.cache.CacheException
      • stop

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

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

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

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

        public org.hibernate.cache.spi.CollectionRegion buildCollectionRegion​(String regionName,
                                                                              Properties properties,
                                                                              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