T - implementation type of HazelcastRegionpublic abstract class AbstractAccessDelegate<T extends HazelcastRegion> extends Object implements AccessDelegate<T>
| Modifier and Type | Field and Description | 
|---|---|
protected RegionCache | 
cache  | 
protected T | 
hazelcastRegion  | 
protected ILogger | 
log  | 
protected Comparator<Object> | 
versionComparator  | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
AbstractAccessDelegate(T hazelcastRegion,
                      Properties props)  | 
| Modifier and Type | Method and Description | 
|---|---|
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)  | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterInsert, afterUpdate, lockItem, putFromLoad, unlockItemprotected final ILogger log
protected final T extends HazelcastRegion hazelcastRegion
protected final RegionCache cache
protected final Comparator<Object> versionComparator
protected AbstractAccessDelegate(T hazelcastRegion, Properties props)
public final T getHazelcastRegion()
AccessDelegategetHazelcastRegion in interface AccessDelegate<T extends HazelcastRegion>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
AccessDelegateget in interface AccessDelegate<T extends HazelcastRegion>key - The key of the item to be retrieved.txTimestamp - a timestamp prior to the transaction start timeorg.hibernate.cache.CacheException - Propogated from underlying org.hibernate.cache.Regionpublic boolean putFromLoad(Object key, Object value, long txTimestamp, Object version) throws org.hibernate.cache.CacheException
AccessDelegateputFromLoad in interface AccessDelegate<T extends HazelcastRegion>key - The item keyvalue - The itemtxTimestamp - a timestamp prior to the transaction start timeversion - the item version numberorg.hibernate.cache.CacheException - Propogated from underlying org.hibernate.cache.Regionpublic void remove(Object key) throws org.hibernate.cache.CacheException
AccessDelegateremove in interface AccessDelegate<T extends HazelcastRegion>key - The key of the item to removeorg.hibernate.cache.CacheException - Propogated from underlying org.hibernate.cache.Regionpublic void removeAll()
               throws org.hibernate.cache.CacheException
AccessDelegateremoveAll in interface AccessDelegate<T extends HazelcastRegion>org.hibernate.cache.CacheException - Propogated from underlying org.hibernate.cache.Regionpublic void evict(Object key) throws org.hibernate.cache.CacheException
AccessDelegateevict in interface AccessDelegate<T extends HazelcastRegion>key - The key of the item to removeorg.hibernate.cache.CacheException - Propogated from underlying org.hibernate.cache.Regionpublic void evictAll()
              throws org.hibernate.cache.CacheException
AccessDelegateevictAll in interface AccessDelegate<T extends HazelcastRegion>org.hibernate.cache.CacheException - Propogated from underlying org.hibernate.cache.Regionpublic SoftLock lockRegion()
                    throws org.hibernate.cache.CacheException
lockRegion in interface AccessDelegate<T extends HazelcastRegion>org.hibernate.cache.CacheException - Propogated from underlying org.hibernate.cache.Regionpublic 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.Regionpublic 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 valueorg.hibernate.cache.CacheException - Propogated from underlying org.hibernate.cache.Regionpublic 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 valueorg.hibernate.cache.CacheException - Propogated from underlying org.hibernate.cache.RegionCopyright © 2014 Hazelcast, Inc.. All Rights Reserved.