|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EntityRegionAccessStrategy
Contract for managing transactional and concurrent access to cached entity data. The expected call sequences related to various operations are:
insert(java.lang.Object, java.lang.Object, java.lang.Object)
-> afterInsert(java.lang.Object, java.lang.Object, java.lang.Object)
RegionAccessStrategy.lockItem(java.lang.Object, java.lang.Object)
-> update(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)
-> afterUpdate(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, org.hibernate.cache.spi.access.SoftLock)
RegionAccessStrategy.lockItem(java.lang.Object, java.lang.Object)
-> RegionAccessStrategy.remove(java.lang.Object)
-> RegionAccessStrategy.unlockItem(java.lang.Object, org.hibernate.cache.spi.access.SoftLock)
@putFromLoad
RegionAccessStrategy.lockRegion()
-> RegionAccessStrategy.removeAll()
-> RegionAccessStrategy.unlockRegion(org.hibernate.cache.spi.access.SoftLock)
Method Summary | |
---|---|
boolean |
afterInsert(Object key,
Object value,
Object version)
Called after an item has been inserted (after the transaction completes), instead of calling release(). |
boolean |
afterUpdate(Object key,
Object value,
Object currentVersion,
Object previousVersion,
SoftLock lock)
Called after an item has been updated (after the transaction completes), instead of calling release(). |
EntityRegion |
getRegion()
Get the wrapped entity cache region |
boolean |
insert(Object key,
Object value,
Object version)
Called after an item has been inserted (before the transaction completes), instead of calling evict(). |
boolean |
update(Object key,
Object value,
Object currentVersion,
Object previousVersion)
Called after an item has been updated (before the transaction completes), instead of calling evict(). |
Methods inherited from interface org.hibernate.cache.spi.access.RegionAccessStrategy |
---|
evict, evictAll, get, lockItem, lockRegion, putFromLoad, putFromLoad, remove, removeAll, unlockItem, unlockRegion |
Method Detail |
---|
EntityRegion getRegion()
boolean insert(Object key, Object value, Object version) throws CacheException
key
- The item keyvalue
- The itemversion
- The item's version value
CacheException
- Propogated from underlying Region
boolean afterInsert(Object key, Object value, Object version) throws CacheException
key
- The item keyvalue
- The itemversion
- The item's version value
CacheException
- Propogated from underlying Region
boolean update(Object key, Object value, Object currentVersion, Object previousVersion) throws CacheException
key
- The item keyvalue
- The itemcurrentVersion
- The item's current version valuepreviousVersion
- The item's previous version value
CacheException
- Propogated from underlying Region
boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock) throws CacheException
key
- The item keyvalue
- The itemcurrentVersion
- The item's current version valuepreviousVersion
- The item's previous version valuelock
- The lock previously obtained from RegionAccessStrategy.lockItem(java.lang.Object, java.lang.Object)
CacheException
- Propogated from underlying Region
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |