|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.hibernate.access.AbstractAccessDelegate<T> com.hazelcast.hibernate.access.NonStrictReadWriteAccessDelegate<T>
T
- implementation type of HazelcastRegionpublic class NonStrictReadWriteAccessDelegate<T extends HazelcastRegion>
Makes no guarantee of consistency between the cache and the database. Stale data from the cache is possible if expiry is not configured appropriately.
Field Summary |
---|
Fields inherited from class com.hazelcast.hibernate.access.AbstractAccessDelegate |
---|
cache, hazelcastRegion, log, versionComparator |
Constructor Summary | |
---|---|
NonStrictReadWriteAccessDelegate(T hazelcastRegion,
Properties props)
|
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(). |
SoftLock |
lockItem(Object key,
Object version)
We are going to attempt to update/delete the keyed object. |
boolean |
putFromLoad(Object key,
Object value,
long txTimestamp,
Object version,
boolean minimalPutOverride)
Attempt to cache an object, after loading from the database, explicitly specifying the minimalPut behavior. |
void |
unlockItem(Object key,
SoftLock lock)
Called when we have finished the attempted update/delete (which may or may not have been successful), after transaction completion. |
void |
unlockRegion(SoftLock lock)
NO-OP |
Methods inherited from class com.hazelcast.hibernate.access.AbstractAccessDelegate |
---|
evict, evictAll, get, getHazelcastRegion, insert, lockRegion, put, putFromLoad, remove, removeAll, update, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NonStrictReadWriteAccessDelegate(T hazelcastRegion, Properties props)
Method Detail |
---|
public boolean afterInsert(Object key, Object value, Object version) throws org.hibernate.cache.CacheException
AccessDelegate
key
- The item keyvalue
- The itemversion
- The item's version value
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock) throws org.hibernate.cache.CacheException
AccessDelegate
key
- The item keyvalue
- The itemcurrentVersion
- The item's current version valuepreviousVersion
- The item's previous version valuelock
- The lock previously obtained from AccessDelegate.lockItem(java.lang.Object, java.lang.Object)
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) throws org.hibernate.cache.CacheException
AccessDelegate
key
- The item keyvalue
- The itemtxTimestamp
- a timestamp prior to the transaction start timeversion
- the item version numberminimalPutOverride
- Explicit minimalPut flag
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public SoftLock lockItem(Object key, Object version) throws org.hibernate.cache.CacheException
AccessDelegate
key
- The key of the item to lockversion
- The item's current version value
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public void unlockItem(Object key, SoftLock lock) throws org.hibernate.cache.CacheException
AccessDelegate
key
- The item keylock
- The lock previously obtained from AccessDelegate.lockItem(java.lang.Object, java.lang.Object)
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public void unlockRegion(SoftLock lock) throws org.hibernate.cache.CacheException
AbstractAccessDelegate
unlockRegion
in interface AccessDelegate<T extends HazelcastRegion>
unlockRegion
in class AbstractAccessDelegate<T extends HazelcastRegion>
lock
- The lock previously obtained from AccessDelegate.lockRegion()
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |