Package org.redisson.hibernate.strategy
Class ReadWriteCollectionRegionAccessStrategy
- java.lang.Object
-
- org.redisson.hibernate.strategy.AbstractReadWriteAccessStrategy
-
- org.redisson.hibernate.strategy.ReadWriteCollectionRegionAccessStrategy
-
- All Implemented Interfaces:
org.hibernate.cache.spi.access.CollectionRegionAccessStrategy,org.hibernate.cache.spi.access.RegionAccessStrategy
public class ReadWriteCollectionRegionAccessStrategy extends AbstractReadWriteAccessStrategy implements org.hibernate.cache.spi.access.CollectionRegionAccessStrategy
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description ReadWriteCollectionRegionAccessStrategy(org.hibernate.cfg.Settings settings, org.hibernate.cache.spi.GeneralDataRegion region, RMapCache<Object,Object> mapCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevict(Object key)voidevictAll()ObjectgenerateCacheKey(Object id, org.hibernate.persister.collection.CollectionPersister persister, org.hibernate.engine.spi.SessionFactoryImplementor factory, String tenantIdentifier)ObjectgetCacheKeyId(Object cacheKey)org.hibernate.cache.spi.CollectionRegiongetRegion()org.hibernate.cache.spi.access.SoftLocklockRegion()booleanputFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value, long txTimestamp, Object version)voidremove(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key)voidremoveAll()voidunlockRegion(org.hibernate.cache.spi.access.SoftLock lock)-
Methods inherited from class org.redisson.hibernate.strategy.AbstractReadWriteAccessStrategy
get, lockItem, putFromLoad, unlockItem
-
-
-
-
Method Detail
-
getRegion
public org.hibernate.cache.spi.CollectionRegion getRegion()
- Specified by:
getRegionin interfaceorg.hibernate.cache.spi.access.CollectionRegionAccessStrategy
-
generateCacheKey
public Object generateCacheKey(Object id, org.hibernate.persister.collection.CollectionPersister persister, org.hibernate.engine.spi.SessionFactoryImplementor factory, String tenantIdentifier)
- Specified by:
generateCacheKeyin interfaceorg.hibernate.cache.spi.access.CollectionRegionAccessStrategy
-
getCacheKeyId
public Object getCacheKeyId(Object cacheKey)
- Specified by:
getCacheKeyIdin interfaceorg.hibernate.cache.spi.access.CollectionRegionAccessStrategy
-
putFromLoad
public boolean putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value, long txTimestamp, Object version) throws org.hibernate.cache.CacheException- Specified by:
putFromLoadin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
lockRegion
public org.hibernate.cache.spi.access.SoftLock lockRegion() throws org.hibernate.cache.CacheException- Specified by:
lockRegionin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
unlockRegion
public void unlockRegion(org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException- Specified by:
unlockRegionin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
remove
public void remove(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key) throws org.hibernate.cache.CacheException- Specified by:
removein interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
removeAll
public void removeAll() throws org.hibernate.cache.CacheException- Specified by:
removeAllin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
evict
public void evict(Object key) throws org.hibernate.cache.CacheException
- Specified by:
evictin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
evictAll
public void evictAll() throws org.hibernate.cache.CacheException- Specified by:
evictAllin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
-