Package org.redisson.hibernate.strategy
Class ReadWriteEntityRegionAccessStrategy
java.lang.Object
org.redisson.hibernate.strategy.AbstractReadWriteAccessStrategy
org.redisson.hibernate.strategy.ReadWriteEntityRegionAccessStrategy
- All Implemented Interfaces:
org.hibernate.cache.spi.access.EntityRegionAccessStrategy,org.hibernate.cache.spi.access.RegionAccessStrategy
public class ReadWriteEntityRegionAccessStrategy
extends AbstractReadWriteAccessStrategy
implements org.hibernate.cache.spi.access.EntityRegionAccessStrategy
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorsConstructorDescriptionReadWriteEntityRegionAccessStrategy(org.hibernate.cfg.Settings settings, org.hibernate.cache.spi.GeneralDataRegion region, RMapCache<Object, Object> mapCache) -
Method Summary
Modifier and TypeMethodDescriptionbooleanafterInsert(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, Object version) booleanafterUpdate(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, Object currentVersion, Object previousVersion, org.hibernate.cache.spi.access.SoftLock lock) voidvoidevictAll()generateCacheKey(Object id, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.spi.SessionFactoryImplementor factory, String tenantIdentifier) getCacheKeyId(Object cacheKey) org.hibernate.cache.spi.EntityRegionbooleaninsert(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, Object version) org.hibernate.cache.spi.access.SoftLockbooleanputFromLoad(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, long txTimestamp, Object version) voidvoidvoidunlockRegion(org.hibernate.cache.spi.access.SoftLock lock) booleanupdate(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, Object currentVersion, Object previousVersion) Methods inherited from class org.redisson.hibernate.strategy.AbstractReadWriteAccessStrategy
get, lockItem, putFromLoad, unlockItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.cache.spi.access.RegionAccessStrategy
evict, evictAll, get, lockItem, lockRegion, putFromLoad, putFromLoad, remove, removeAll, unlockItem, unlockRegion
-
Constructor Details
-
ReadWriteEntityRegionAccessStrategy
-
-
Method Details
-
getRegion
public org.hibernate.cache.spi.EntityRegion getRegion()- Specified by:
getRegionin interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy
-
insert
public boolean insert(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, Object version) throws org.hibernate.cache.CacheException - Specified by:
insertin interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
afterInsert
public boolean afterInsert(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, Object version) throws org.hibernate.cache.CacheException - Specified by:
afterInsertin interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
update
public boolean update(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, Object currentVersion, Object previousVersion) throws org.hibernate.cache.CacheException - Specified by:
updatein interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
afterUpdate
public boolean afterUpdate(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, Object currentVersion, Object previousVersion, org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException - Specified by:
afterUpdatein interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
generateCacheKey
public Object generateCacheKey(Object id, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.spi.SessionFactoryImplementor factory, String tenantIdentifier) - Specified by:
generateCacheKeyin interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy
-
getCacheKeyId
- Specified by:
getCacheKeyIdin interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy
-
putFromLoad
public boolean putFromLoad(org.hibernate.engine.spi.SessionImplementor 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.SessionImplementor 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
- 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
-