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
,RedissonRegionNativeFactory
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.CollectionRegion
buildCollectionRegion
(String regionName, Properties properties, org.hibernate.cache.spi.CacheDataDescription metadata) org.hibernate.cache.spi.EntityRegion
buildEntityRegion
(String regionName, Properties properties, org.hibernate.cache.spi.CacheDataDescription metadata) org.hibernate.cache.spi.NaturalIdRegion
buildNaturalIdRegion
(String regionName, Properties properties, org.hibernate.cache.spi.CacheDataDescription metadata) org.hibernate.cache.spi.QueryResultsRegion
buildQueryResultsRegion
(String regionName, Properties properties) org.hibernate.cache.spi.TimestampsRegion
buildTimestampsRegion
(String regionName, Properties properties) protected RedissonClient
createRedissonClient
(Properties properties) getCache
(String regionName, Properties properties, String defaultKey) org.hibernate.cache.spi.access.AccessType
boolean
long
void
start
(org.hibernate.cfg.Settings settings, Properties properties) void
stop()
-
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.cfg.Settings settings, Properties properties) throws org.hibernate.cache.CacheException - Specified by:
start
in interfaceorg.hibernate.cache.spi.RegionFactory
- Throws:
org.hibernate.cache.CacheException
-
createRedissonClient
-
stop
public void stop()- Specified by:
stop
in interfaceorg.hibernate.cache.spi.RegionFactory
-
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()- Specified by:
isMinimalPutsEnabledByDefault
in interfaceorg.hibernate.cache.spi.RegionFactory
-
getDefaultAccessType
public org.hibernate.cache.spi.access.AccessType getDefaultAccessType()- Specified by:
getDefaultAccessType
in interfaceorg.hibernate.cache.spi.RegionFactory
-
nextTimestamp
public long nextTimestamp()- Specified by:
nextTimestamp
in 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:
buildEntityRegion
in 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:
buildNaturalIdRegion
in 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:
buildCollectionRegion
in 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:
buildQueryResultsRegion
in 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:
buildTimestampsRegion
in interfaceorg.hibernate.cache.spi.RegionFactory
- Throws:
org.hibernate.cache.CacheException
-
getCache
-