|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NaturalIdRegionAccessStrategy
Contract for managing transactional and concurrent access to cached naturalId data. The expected call sequences related to various operations are:
insert(java.lang.Object, java.lang.Object) -> afterInsert(java.lang.Object, java.lang.Object)RegionAccessStrategy.lockItem(java.lang.Object, java.lang.Object) -> RegionAccessStrategy.remove(java.lang.Object) -> update(java.lang.Object, java.lang.Object) -> afterUpdate(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)@putFromLoadRegionAccessStrategy.lockRegion() -> RegionAccessStrategy.removeAll() -> RegionAccessStrategy.unlockRegion(org.hibernate.cache.spi.access.SoftLock)
IMPORTANT : NaturalIds are not versioned so null will always be passed to the version parameter to:RegionAccessStrategy.putFromLoad(Object, Object, long, Object)RegionAccessStrategy.putFromLoad(Object, Object, long, Object, boolean)RegionAccessStrategy.lockItem(Object, Object)
| Method Summary | |
|---|---|
boolean |
afterInsert(Object key,
Object value)
Called after an item has been inserted (after the transaction completes), instead of calling release(). |
boolean |
afterUpdate(Object key,
Object value,
SoftLock lock)
Called after an item has been updated (after the transaction completes), instead of calling release(). |
NaturalIdRegion |
getRegion()
Get the wrapped naturalId cache region |
boolean |
insert(Object key,
Object value)
Called after an item has been inserted (before the transaction completes), instead of calling evict(). |
boolean |
update(Object key,
Object value)
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 |
|---|
NaturalIdRegion getRegion()
boolean insert(Object key,
Object value)
throws CacheException
key - The item keyvalue - The item
CacheException - Propogated from underlying Region
boolean afterInsert(Object key,
Object value)
throws CacheException
key - The item keyvalue - The item
CacheException - Propogated from underlying Region
boolean update(Object key,
Object value)
throws CacheException
key - The item keyvalue - The item
CacheException - Propogated from underlying Region
boolean afterUpdate(Object key,
Object value,
SoftLock lock)
throws CacheException
key - The item keyvalue - The itemlock - 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 | |||||||||