Package org.redisson.hibernate.strategy
Class ReadOnlyEntityRegionAccessStrategy
java.lang.Object
org.redisson.hibernate.strategy.ReadOnlyEntityRegionAccessStrategy
- All Implemented Interfaces:
org.hibernate.cache.spi.access.EntityRegionAccessStrategy
,org.hibernate.cache.spi.access.RegionAccessStrategy
public class ReadOnlyEntityRegionAccessStrategy
extends Object
implements org.hibernate.cache.spi.access.EntityRegionAccessStrategy
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorsConstructorDescriptionReadOnlyEntityRegionAccessStrategy
(org.hibernate.cfg.Settings settings, org.hibernate.cache.spi.GeneralDataRegion region) -
Method Summary
Modifier and TypeMethodDescriptionboolean
afterInsert
(Object key, Object value, Object version) boolean
afterUpdate
(Object key, Object value, Object currentVersion, Object previousVersion, org.hibernate.cache.spi.access.SoftLock lock) void
void
evictAll()
org.hibernate.cache.spi.EntityRegion
boolean
org.hibernate.cache.spi.access.SoftLock
org.hibernate.cache.spi.access.SoftLock
boolean
putFromLoad
(Object key, Object value, long txTimestamp, Object version) boolean
putFromLoad
(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) void
void
void
unlockItem
(Object key, org.hibernate.cache.spi.access.SoftLock lock) void
unlockRegion
(org.hibernate.cache.spi.access.SoftLock lock) boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.cache.spi.access.RegionAccessStrategy
evict, evictAll, lockRegion, putFromLoad, remove, removeAll, unlockRegion
-
Constructor Details
-
ReadOnlyEntityRegionAccessStrategy
public ReadOnlyEntityRegionAccessStrategy(org.hibernate.cfg.Settings settings, org.hibernate.cache.spi.GeneralDataRegion region)
-
-
Method Details
-
get
- Specified by:
get
in interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
putFromLoad
public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) throws org.hibernate.cache.CacheException - Specified by:
putFromLoad
in interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
lockItem
public org.hibernate.cache.spi.access.SoftLock lockItem(Object key, Object version) throws org.hibernate.cache.CacheException - Specified by:
lockItem
in interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
unlockItem
public void unlockItem(Object key, org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException - Specified by:
unlockItem
in interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
getRegion
public org.hibernate.cache.spi.EntityRegion getRegion()- Specified by:
getRegion
in interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy
-
insert
public boolean insert(Object key, Object value, Object version) throws org.hibernate.cache.CacheException - Specified by:
insert
in interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
afterInsert
public boolean afterInsert(Object key, Object value, Object version) throws org.hibernate.cache.CacheException - Specified by:
afterInsert
in interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
update
public boolean update(Object key, Object value, Object currentVersion, Object previousVersion) throws org.hibernate.cache.CacheException - Specified by:
update
in interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
afterUpdate
public boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException - Specified by:
afterUpdate
in interfaceorg.hibernate.cache.spi.access.EntityRegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
putFromLoad
public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version) throws org.hibernate.cache.CacheException - Specified by:
putFromLoad
in 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:
lockRegion
in 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:
unlockRegion
in interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
remove
- Specified by:
remove
in interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
removeAll
public void removeAll() throws org.hibernate.cache.CacheException- Specified by:
removeAll
in interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
evict
- Specified by:
evict
in interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-
evictAll
public void evictAll() throws org.hibernate.cache.CacheException- Specified by:
evictAll
in interfaceorg.hibernate.cache.spi.access.RegionAccessStrategy
- Throws:
org.hibernate.cache.CacheException
-