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
|
SoftLock |
lockRegion()
NO-OP
|
boolean |
putFromLoad(Object key,
Object value,
long txTimestamp,
Object version)
Attempt to cache an object, after loading from the database.
|
boolean |
putFromLoad(Object key,
Object value,
long txTimestamp,
Object version,
boolean minimalPuts)
Attempt to cache an object, after loading from the database, explicitly
specifying the minimalPut behavior.
|
void |
unlockRegion(SoftLock lock)
Called after we have finished the attempted invalidation of the entire
region
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterInsert, afterUpdate, insert, lockItem, remove, removeAll, unlockItem, update
protected 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()
AccessDelegate
getHazelcastRegion
in interface AccessDelegate<T extends HazelcastRegion>
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 timeorg.hibernate.cache.CacheException
- Propagated 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 numberorg.hibernate.cache.CacheException
- Propagated from underlying org.hibernate.cache.Region
public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPuts) 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 numberminimalPuts
- Explicit minimalPut flagorg.hibernate.cache.CacheException
- Propagated 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 removeorg.hibernate.cache.CacheException
- Propagated 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
- Propagated 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
- Propagated from underlying org.hibernate.cache.Region
public void unlockRegion(SoftLock lock) throws org.hibernate.cache.CacheException
AccessDelegate
unlockRegion
in interface AccessDelegate<T extends HazelcastRegion>
lock
- The lock previously obtained from AccessDelegate.lockRegion()
org.hibernate.cache.CacheException
- Propagated from underlying org.hibernate.cache.Region
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.