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
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 Stringstatic final Stringstatic final Stringprotected booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.hibernate.cache.spi.AbstractRegionFactory
LEGACY_QUERY_RESULTS_REGION_UNQUALIFIED_NAMES, LEGACY_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAMESFields 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.DomainDataRegionbuildDomainDataRegion(org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig, org.hibernate.cache.cfg.spi.DomainDataRegionBuildingContext buildingContext) protected org.hibernate.cache.spi.support.DomainDataStorageAccesscreateDomainDataStorageAccess(org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig, org.hibernate.cache.cfg.spi.DomainDataRegionBuildingContext buildingContext) protected org.hibernate.cache.spi.support.StorageAccesscreateQueryResultsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) protected RedissonClientcreateRedissonClient(org.hibernate.boot.registry.StandardServiceRegistry registry, Map properties) protected org.hibernate.cache.spi.support.StorageAccesscreateTimestampsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) org.hibernate.cache.spi.access.AccessTypeprotected org.hibernate.cache.spi.CacheKeysFactorybooleanlongprotected voidprepareForUse(org.hibernate.boot.spi.SessionFactoryOptions settings, Map properties) protected voidMethods inherited from class org.hibernate.cache.spi.support.RegionFactoryTemplate
buildQueryResultsRegion, buildTimestampsRegionMethods 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:
getImplicitCacheKeysFactoryin 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:
prepareForUsein 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:
releaseFromUsein classorg.hibernate.cache.spi.AbstractRegionFactory
-
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()- Specified by:
isMinimalPutsEnabledByDefaultin interfaceorg.hibernate.cache.spi.RegionFactory- Overrides:
isMinimalPutsEnabledByDefaultin classorg.hibernate.cache.spi.AbstractRegionFactory
-
getDefaultAccessType
public org.hibernate.cache.spi.access.AccessType getDefaultAccessType()- Specified by:
getDefaultAccessTypein interfaceorg.hibernate.cache.spi.RegionFactory- Overrides:
getDefaultAccessTypein classorg.hibernate.cache.spi.AbstractRegionFactory
-
nextTimestamp
public long nextTimestamp()- Specified by:
nextTimestampin interfaceorg.hibernate.cache.spi.RegionFactory- Overrides:
nextTimestampin 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:
buildDomainDataRegionin interfaceorg.hibernate.cache.spi.RegionFactory- Overrides:
buildDomainDataRegionin 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:
createDomainDataStorageAccessin 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:
createQueryResultsRegionStorageAccessin 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:
createTimestampsRegionStorageAccessin classorg.hibernate.cache.spi.support.RegionFactoryTemplate
-
getCache
-