public abstract class BaseRegionAccessStrategy extends java.lang.Object implements RegionAccessStrategy
| Constructor and Description |
|---|
BaseRegionAccessStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
evict(java.lang.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.
|
java.lang.Object |
get(SharedSessionContractImplementor session,
java.lang.Object key,
long txTimestamp)
Attempt to retrieve an object from the cache.
|
protected abstract org.hibernate.testing.cache.BaseGeneralDataRegion |
getInternalRegion() |
protected abstract boolean |
isDefaultMinimalPutOverride() |
SoftLock |
lockItem(SharedSessionContractImplementor session,
java.lang.Object key,
java.lang.Object version)
We are going to attempt to update/delete the keyed object.
|
SoftLock |
lockRegion()
Region locks are not supported.
|
boolean |
putFromLoad(SharedSessionContractImplementor session,
java.lang.Object key,
java.lang.Object value,
long txTimestamp,
java.lang.Object version)
Attempt to cache an object, after loading from the database.
|
boolean |
putFromLoad(SharedSessionContractImplementor session,
java.lang.Object key,
java.lang.Object value,
long txTimestamp,
java.lang.Object version,
boolean minimalPutOverride)
Attempt to cache an object, after loading from the database, explicitly
specifying the minimalPut behavior.
|
void |
remove(SharedSessionContractImplementor session,
java.lang.Object key)
A no-op since this is an asynchronous cache access strategy.
|
void |
removeAll()
Called to evict data from the entire region
|
void |
unlockItem(SharedSessionContractImplementor session,
java.lang.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)
Region locks are not supported - perform a cache clear as a precaution.
|
protected abstract org.hibernate.testing.cache.BaseGeneralDataRegion getInternalRegion()
protected abstract boolean isDefaultMinimalPutOverride()
public java.lang.Object get(SharedSessionContractImplementor session, java.lang.Object key, long txTimestamp) throws CacheException
RegionAccessStrategyget in interface RegionAccessStrategysession - Current session.key - The key of the item to be retrieved.txTimestamp - a timestamp prior to the transaction start timeCacheException - Propogated from underlying Regionpublic boolean putFromLoad(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version) throws CacheException
RegionAccessStrategyputFromLoad in interface RegionAccessStrategysession - Current session.key - The item keyvalue - The itemtxTimestamp - a timestamp prior to the transaction start timeversion - the item version numberCacheException - Propogated from underlying Regionpublic boolean putFromLoad(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version, boolean minimalPutOverride) throws CacheException
RegionAccessStrategyputFromLoad in interface RegionAccessStrategysession - Current session.key - The item keyvalue - The itemtxTimestamp - a timestamp prior to the transaction start timeversion - the item version numberminimalPutOverride - Explicit minimalPut flagCacheException - Propogated from underlying Regionpublic SoftLock lockRegion() throws CacheException
lockRegion in interface RegionAccessStrategynullCacheException - Propogated from underlying RegionRegionAccessStrategy.lockRegion(),
RegionAccessStrategy.lockRegion()public void unlockRegion(SoftLock lock) throws CacheException
unlockRegion in interface RegionAccessStrategylock - The lock previously obtained from RegionAccessStrategy.lockRegion()CacheException - Propogated from underlying RegionRegionAccessStrategy.unlockRegion(org.hibernate.cache.spi.access.SoftLock),
RegionAccessStrategy.unlockRegion(org.hibernate.cache.spi.access.SoftLock)public SoftLock lockItem(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object version) throws CacheException
RegionAccessStrategyRegionAccessStrategy.unlockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, org.hibernate.cache.spi.access.SoftLock), to release the
lock. Concurrency strategies which do not support client-visible
locks may silently return null.lockItem in interface RegionAccessStrategysession - Current session.key - The key of the item to lockversion - The item's current version valueCacheException - Propogated from underlying Regionpublic void unlockItem(SharedSessionContractImplementor session, java.lang.Object key, SoftLock lock) throws CacheException
RegionAccessStrategyunlockItem in interface RegionAccessStrategysession - Current session.key - The item keylock - The lock previously obtained from RegionAccessStrategy.lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)CacheException - Propogated from underlying Regionpublic void remove(SharedSessionContractImplementor session, java.lang.Object key) throws CacheException
remove in interface RegionAccessStrategykey - The key of the item to removeCacheException - Propogated from underlying RegionRegionAccessStrategy.remove(SharedSessionContractImplementor, Object)public void removeAll()
throws CacheException
removeAll in interface RegionAccessStrategyCacheException - Propogated from underlying RegionRegionAccessStrategy.removeAll(),
RegionAccessStrategy.removeAll()public void evict(java.lang.Object key)
throws CacheException
RegionAccessStrategyevict in interface RegionAccessStrategykey - The key of the item to removeCacheException - Propogated from underlying Regionpublic void evictAll()
throws CacheException
RegionAccessStrategyevictAll in interface RegionAccessStrategyCacheException - Propogated from underlying RegionCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.