|
||||||||||
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>
T
- implementation type of HazelcastRegionpublic abstract class AbstractAccessDelegate<T extends HazelcastRegion>
Base implementation for consistency guarantees
Field Summary | |
---|---|
protected RegionCache |
cache
|
protected T |
hazelcastRegion
|
protected ILogger |
log
|
protected Comparator<Object> |
versionComparator
|
Constructor Summary | |
---|---|
protected |
AbstractAccessDelegate(T hazelcastRegion,
Properties props)
|
Method Summary | |
---|---|
void |
evict(Object key)
Forcibly evict an item from the cache immediately without regard for transaction isolation. |
void |
evictAll()
Forcibly evict all items from the cache immediately without regard for transaction isolation. |
Object |
get(Object key,
long txTimestamp)
Attempt to retrieve an object from the cache. |
T |
getHazelcastRegion()
Get the wrapped cache region |
boolean |
insert(Object key,
Object value,
Object version)
This is an asynchronous cache access strategy. |
SoftLock |
lockRegion()
NO-OP |
protected boolean |
put(Object key,
Object value,
Object currentVersion)
|
boolean |
putFromLoad(Object key,
Object value,
long txTimestamp,
Object version)
Attempt to cache an object, after loading from the database. |
void |
remove(Object key)
Called after an item has become stale (before the transaction completes). |
void |
removeAll()
Called to evict data from the entire region |
void |
unlockRegion(SoftLock lock)
NO-OP |
boolean |
update(Object key,
Object value,
Object currentVersion,
Object previousVersion)
This is an asynchronous cache access strategy. |
protected boolean |
update(Object key,
Object value,
Object currentVersion,
Object previousVersion,
SoftLock lock)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.hazelcast.hibernate.access.AccessDelegate |
---|
afterInsert, afterUpdate, lockItem, putFromLoad, unlockItem |
Field Detail |
---|
protected final ILogger log
protected final T extends HazelcastRegion hazelcastRegion
protected final RegionCache cache
protected final Comparator<Object> versionComparator
Constructor Detail |
---|
protected AbstractAccessDelegate(T hazelcastRegion, Properties props)
Method Detail |
---|
public final T getHazelcastRegion()
AccessDelegate
getHazelcastRegion
in interface AccessDelegate<T extends HazelcastRegion>
protected boolean put(Object key, Object value, Object currentVersion)
protected boolean update(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock)
public Object get(Object key, long txTimestamp) throws org.hibernate.cache.CacheException
AccessDelegate
get
in interface AccessDelegate<T extends HazelcastRegion>
key
- The key of the item to be retrieved.txTimestamp
- a timestamp prior to the transaction start time
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version) throws org.hibernate.cache.CacheException
AccessDelegate
putFromLoad
in interface AccessDelegate<T extends HazelcastRegion>
key
- The item keyvalue
- The itemtxTimestamp
- a timestamp prior to the transaction start timeversion
- the item version number
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public void remove(Object key) throws org.hibernate.cache.CacheException
AccessDelegate
remove
in interface AccessDelegate<T extends HazelcastRegion>
key
- The key of the item to remove
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public void removeAll() throws org.hibernate.cache.CacheException
AccessDelegate
removeAll
in interface AccessDelegate<T extends HazelcastRegion>
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public void evict(Object key) throws org.hibernate.cache.CacheException
AccessDelegate
evict
in interface AccessDelegate<T extends HazelcastRegion>
key
- The key of the item to remove
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public void evictAll() throws org.hibernate.cache.CacheException
AccessDelegate
evictAll
in interface AccessDelegate<T extends HazelcastRegion>
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public SoftLock lockRegion() throws org.hibernate.cache.CacheException
lockRegion
in interface AccessDelegate<T extends HazelcastRegion>
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public void unlockRegion(SoftLock lock) throws org.hibernate.cache.CacheException
unlockRegion
in interface AccessDelegate<T extends HazelcastRegion>
lock
- The lock previously obtained from AccessDelegate.lockRegion()
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public boolean insert(Object key, Object value, Object version) throws org.hibernate.cache.CacheException
insert
in interface AccessDelegate<T extends HazelcastRegion>
key
- The item keyvalue
- The itemversion
- The item's version value
org.hibernate.cache.CacheException
- Propogated from underlying org.hibernate.cache.Region
public boolean update(Object key, Object value, Object currentVersion, Object previousVersion) throws org.hibernate.cache.CacheException
update
in interface AccessDelegate<T extends HazelcastRegion>
key
- The item keyvalue
- The itemcurrentVersion
- The item's current version valuepreviousVersion
- The item's previous version value
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 |