Package org.redisson.hibernate.strategy
Class ReadOnlyNaturalIdRegionAccessStrategy
- java.lang.Object
-
- org.redisson.hibernate.strategy.ReadOnlyNaturalIdRegionAccessStrategy
-
- All Implemented Interfaces:
org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy,org.hibernate.cache.spi.access.RegionAccessStrategy
public class ReadOnlyNaturalIdRegionAccessStrategy extends Object implements org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyNaturalIdRegionAccessStrategy(org.hibernate.cfg.Settings settings, org.hibernate.cache.spi.GeneralDataRegion region)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanafterInsert(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value)booleanafterUpdate(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, org.hibernate.cache.spi.access.SoftLock lock)voidevict(Object key)voidevictAll()ObjectgenerateCacheKey(Object[] naturalIdValues, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.spi.SessionImplementor session)Objectget(org.hibernate.engine.spi.SessionImplementor session, Object key, long txTimestamp)Object[]getNaturalIdValues(Object cacheKey)org.hibernate.cache.spi.NaturalIdRegiongetRegion()booleaninsert(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value)org.hibernate.cache.spi.access.SoftLocklockItem(org.hibernate.engine.spi.SessionImplementor session, Object key, Object version)org.hibernate.cache.spi.access.SoftLocklockRegion()booleanputFromLoad(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, long txTimestamp, Object version)booleanputFromLoad(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride)voidremove(org.hibernate.engine.spi.SessionImplementor session, Object key)voidremoveAll()voidunlockItem(org.hibernate.engine.spi.SessionImplementor session, Object key, org.hibernate.cache.spi.access.SoftLock lock)voidunlockRegion(org.hibernate.cache.spi.access.SoftLock lock)booleanupdate(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value)
-
-
-
Method Detail
-
get
public Object get(org.hibernate.engine.spi.SessionImplementor session, Object key, long txTimestamp) throws org.hibernate.cache.CacheException
- Specified by:
getin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
putFromLoad
public boolean putFromLoad(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) throws org.hibernate.cache.CacheException- Specified by:
putFromLoadin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
lockItem
public org.hibernate.cache.spi.access.SoftLock lockItem(org.hibernate.engine.spi.SessionImplementor session, Object key, Object version) throws org.hibernate.cache.CacheException- Specified by:
lockItemin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
unlockItem
public void unlockItem(org.hibernate.engine.spi.SessionImplementor session, Object key, org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException- Specified by:
unlockItemin interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
getRegion
public org.hibernate.cache.spi.NaturalIdRegion getRegion()
- Specified by:
getRegionin interfaceorg.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
-
insert
public boolean insert(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value) throws org.hibernate.cache.CacheException- Specified by:
insertin interfaceorg.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
afterInsert
public boolean afterInsert(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value) throws org.hibernate.cache.CacheException- Specified by:
afterInsertin interfaceorg.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
update
public boolean update(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value) throws org.hibernate.cache.CacheException- Specified by:
updatein interfaceorg.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
afterUpdate
public boolean afterUpdate(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value, org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException- Specified by:
afterUpdatein interfaceorg.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy- Throws:
org.hibernate.cache.CacheException
-
generateCacheKey
public Object generateCacheKey(Object[] naturalIdValues, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.spi.SessionImplementor session)
- Specified by:
generateCacheKeyin interfaceorg.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
-
getNaturalIdValues
public Object[] getNaturalIdValues(Object cacheKey)
- Specified by:
getNaturalIdValuesin interfaceorg.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
-
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
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
-
-