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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
protected boolean
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
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 -
Method Summary
Modifier and TypeMethodDescriptionorg.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 RedissonClient
createRedissonClient
(org.hibernate.boot.registry.StandardServiceRegistry registry, Map properties) protected org.hibernate.cache.spi.support.StorageAccess
createTimestampsRegionStorageAccess
(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) org.hibernate.cache.spi.access.AccessType
protected org.hibernate.cache.spi.CacheKeysFactory
boolean
long
protected void
prepareForUse
(org.hibernate.boot.spi.SessionFactoryOptions settings, Map properties) protected void
Methods inherited from class org.hibernate.cache.spi.support.RegionFactoryTemplate
buildQueryResultsRegion, buildTimestampsRegion
Methods inherited from class org.hibernate.cache.spi.AbstractRegionFactory
createTransactionContext, getOptions, getTimeout, isStarted, qualify, start, stop, verifiedStartStatus, verifyStarted
-
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:
-
fallback
protected boolean fallback
-
-
Constructor Details
-
RedissonRegionFactory
public RedissonRegionFactory()
-
-
Method Details
-
getImplicitCacheKeysFactory
protected org.hibernate.cache.spi.CacheKeysFactory getImplicitCacheKeysFactory()- Overrides:
getImplicitCacheKeysFactory
in classorg.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 classorg.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 classorg.hibernate.cache.spi.AbstractRegionFactory
-
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()- Specified by:
isMinimalPutsEnabledByDefault
in interfaceorg.hibernate.cache.spi.RegionFactory
- Overrides:
isMinimalPutsEnabledByDefault
in classorg.hibernate.cache.spi.AbstractRegionFactory
-
getDefaultAccessType
public org.hibernate.cache.spi.access.AccessType getDefaultAccessType()- Specified by:
getDefaultAccessType
in interfaceorg.hibernate.cache.spi.RegionFactory
- Overrides:
getDefaultAccessType
in classorg.hibernate.cache.spi.AbstractRegionFactory
-
nextTimestamp
public long nextTimestamp()- Specified by:
nextTimestamp
in interfaceorg.hibernate.cache.spi.RegionFactory
- Overrides:
nextTimestamp
in classorg.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 interfaceorg.hibernate.cache.spi.RegionFactory
- Overrides:
buildDomainDataRegion
in classorg.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 classorg.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 classorg.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 classorg.hibernate.cache.spi.support.RegionFactoryTemplate
-
getCache
-