Package org.redisson.hibernate
Class RedissonRegionFactory
java.lang.Object
org.redisson.hibernate.RedissonRegionFactory
- All Implemented Interfaces:
Serializable,org.hibernate.cache.spi.RegionFactory,org.hibernate.service.Service
- Direct Known Subclasses:
JndiRedissonRegionFactory
Hibernate Cache region factory based on Redisson.
Creates own Redisson instance during region start.
- Author:
- Nikita Koksharov
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.hibernate.cache.spi.CollectionRegionbuildCollectionRegion(String regionName, Properties properties, org.hibernate.cache.spi.CacheDataDescription metadata) org.hibernate.cache.spi.EntityRegionbuildEntityRegion(String regionName, Properties properties, org.hibernate.cache.spi.CacheDataDescription metadata) org.hibernate.cache.spi.NaturalIdRegionbuildNaturalIdRegion(String regionName, Properties properties, org.hibernate.cache.spi.CacheDataDescription metadata) org.hibernate.cache.spi.QueryResultsRegionbuildQueryResultsRegion(String regionName, Properties properties) org.hibernate.cache.spi.TimestampsRegionbuildTimestampsRegion(String regionName, Properties properties) protected RedissonClientcreateRedissonClient(Properties properties) getCache(String regionName, Properties properties, String defaultKey) org.hibernate.cache.spi.access.AccessTypebooleanlongvoidstart(org.hibernate.boot.spi.SessionFactoryOptions settings, Properties properties) voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.cache.spi.RegionFactory
buildCollectionRegion, buildEntityRegion, buildNaturalIdRegion, buildQueryResultsRegion, buildTimestampsRegion, start
-
Field Details
-
QUERY_DEF
- See Also:
-
COLLECTION_DEF
- See Also:
-
ENTITY_DEF
- See Also:
-
NATURAL_ID_DEF
- See Also:
-
TIMESTAMPS_DEF
- See Also:
-
MAX_ENTRIES_SUFFIX
- See Also:
-
TTL_SUFFIX
- See Also:
-
MAX_IDLE_SUFFIX
- See Also:
-
CONFIG_PREFIX
- See Also:
-
REDISSON_CONFIG_PATH
- See Also:
-
FALLBACK
- See Also:
-
redisson
-
-
Constructor Details
-
RedissonRegionFactory
public RedissonRegionFactory()
-
-
Method Details
-
start
public void start(org.hibernate.boot.spi.SessionFactoryOptions settings, Properties properties) throws org.hibernate.cache.CacheException - Specified by:
startin interfaceorg.hibernate.cache.spi.RegionFactory- Throws:
org.hibernate.cache.CacheException
-
createRedissonClient
-
stop
public void stop()- Specified by:
stopin interfaceorg.hibernate.cache.spi.RegionFactory
-
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()- Specified by:
isMinimalPutsEnabledByDefaultin interfaceorg.hibernate.cache.spi.RegionFactory
-
getDefaultAccessType
public org.hibernate.cache.spi.access.AccessType getDefaultAccessType()- Specified by:
getDefaultAccessTypein interfaceorg.hibernate.cache.spi.RegionFactory
-
nextTimestamp
public long nextTimestamp()- Specified by:
nextTimestampin interfaceorg.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:
buildEntityRegionin interfaceorg.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:
buildNaturalIdRegionin interfaceorg.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:
buildCollectionRegionin interfaceorg.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:
buildQueryResultsRegionin interfaceorg.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:
buildTimestampsRegionin interfaceorg.hibernate.cache.spi.RegionFactory- Throws:
org.hibernate.cache.CacheException
-
getCache
-