public class NonstopAwareEntityRegionAccessStrategy
extends java.lang.Object
implements org.hibernate.cache.access.EntityRegionAccessStrategy
EntityRegionAccessStrategy
that handles NonStopCacheException
using
HibernateNonstopCacheExceptionHandler
Modifier and Type | Field and Description |
---|---|
private org.hibernate.cache.access.EntityRegionAccessStrategy |
actualStrategy |
private HibernateNonstopCacheExceptionHandler |
hibernateNonstopExceptionHandler |
Constructor and Description |
---|
NonstopAwareEntityRegionAccessStrategy(org.hibernate.cache.access.EntityRegionAccessStrategy actualStrategy,
HibernateNonstopCacheExceptionHandler hibernateNonstopExceptionHandler)
Constructor accepting the actual
EntityRegionAccessStrategy and the HibernateNonstopCacheExceptionHandler |
Modifier and Type | Method and Description |
---|---|
boolean |
afterInsert(java.lang.Object key,
java.lang.Object value,
java.lang.Object version) |
boolean |
afterUpdate(java.lang.Object key,
java.lang.Object value,
java.lang.Object currentVersion,
java.lang.Object previousVersion,
org.hibernate.cache.access.SoftLock lock) |
void |
evict(java.lang.Object key) |
void |
evictAll() |
java.lang.Object |
get(java.lang.Object key,
long txTimestamp) |
org.hibernate.cache.EntityRegion |
getRegion() |
boolean |
insert(java.lang.Object key,
java.lang.Object value,
java.lang.Object version) |
org.hibernate.cache.access.SoftLock |
lockItem(java.lang.Object key,
java.lang.Object version) |
org.hibernate.cache.access.SoftLock |
lockRegion() |
boolean |
putFromLoad(java.lang.Object key,
java.lang.Object value,
long txTimestamp,
java.lang.Object version) |
boolean |
putFromLoad(java.lang.Object key,
java.lang.Object value,
long txTimestamp,
java.lang.Object version,
boolean minimalPutOverride) |
void |
remove(java.lang.Object key) |
void |
removeAll() |
void |
unlockItem(java.lang.Object key,
org.hibernate.cache.access.SoftLock lock) |
void |
unlockRegion(org.hibernate.cache.access.SoftLock lock) |
boolean |
update(java.lang.Object key,
java.lang.Object value,
java.lang.Object currentVersion,
java.lang.Object previousVersion) |
private final org.hibernate.cache.access.EntityRegionAccessStrategy actualStrategy
private final HibernateNonstopCacheExceptionHandler hibernateNonstopExceptionHandler
public NonstopAwareEntityRegionAccessStrategy(org.hibernate.cache.access.EntityRegionAccessStrategy actualStrategy, HibernateNonstopCacheExceptionHandler hibernateNonstopExceptionHandler)
EntityRegionAccessStrategy
and the HibernateNonstopCacheExceptionHandler
actualStrategy
- hibernateNonstopExceptionHandler
- public org.hibernate.cache.EntityRegion getRegion()
getRegion
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
EntityRegionAccessStrategy.getRegion()
public boolean afterInsert(java.lang.Object key, java.lang.Object value, java.lang.Object version) throws org.hibernate.cache.CacheException
afterInsert
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.afterInsert(java.lang.Object, java.lang.Object, java.lang.Object)
public boolean afterUpdate(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion, org.hibernate.cache.access.SoftLock lock) throws org.hibernate.cache.CacheException
afterUpdate
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.afterUpdate(java.lang.Object, java.lang.Object, java.lang.Object,
java.lang.Object, org.hibernate.cache.access.SoftLock)
public void evict(java.lang.Object key) throws org.hibernate.cache.CacheException
evict
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.evict(java.lang.Object)
public void evictAll() throws org.hibernate.cache.CacheException
evictAll
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.evictAll()
public java.lang.Object get(java.lang.Object key, long txTimestamp) throws org.hibernate.cache.CacheException
get
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.get(java.lang.Object, long)
public boolean insert(java.lang.Object key, java.lang.Object value, java.lang.Object version) throws org.hibernate.cache.CacheException
insert
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.insert(java.lang.Object, java.lang.Object, java.lang.Object)
public org.hibernate.cache.access.SoftLock lockItem(java.lang.Object key, java.lang.Object version) throws org.hibernate.cache.CacheException
lockItem
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.lockItem(java.lang.Object, java.lang.Object)
public org.hibernate.cache.access.SoftLock lockRegion() throws org.hibernate.cache.CacheException
lockRegion
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.lockRegion()
public boolean putFromLoad(java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version, boolean minimalPutOverride) throws org.hibernate.cache.CacheException
putFromLoad
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object,
boolean)
public boolean putFromLoad(java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version) throws org.hibernate.cache.CacheException
putFromLoad
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object)
public void remove(java.lang.Object key) throws org.hibernate.cache.CacheException
remove
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.remove(java.lang.Object)
public void removeAll() throws org.hibernate.cache.CacheException
removeAll
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.removeAll()
public void unlockItem(java.lang.Object key, org.hibernate.cache.access.SoftLock lock) throws org.hibernate.cache.CacheException
unlockItem
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.unlockItem(java.lang.Object, org.hibernate.cache.access.SoftLock)
public void unlockRegion(org.hibernate.cache.access.SoftLock lock) throws org.hibernate.cache.CacheException
unlockRegion
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.unlockRegion(org.hibernate.cache.access.SoftLock)
public boolean update(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion) throws org.hibernate.cache.CacheException
update
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.update(java.lang.Object, java.lang.Object, java.lang.Object,
java.lang.Object)