public class CollectionAccessStrategyAdapter extends Object implements CollectionRegionAccessStrategy
CollectionRegionAccessStrategy to CacheConcurrencyStrategy.| Constructor and Description |
|---|
CollectionAccessStrategyAdapter(CollectionRegion region,
CacheConcurrencyStrategy ccs,
Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
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.
|
CollectionRegion |
getRegion()
Get the wrapped collection cache region
|
SoftLock |
lockItem(Object key,
Object version)
We are going to attempt to update/delete the keyed object.
|
SoftLock |
lockRegion()
Lock the entire region
|
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 minimalPutOverride)
Attempt to cache an object, after loading from the database, explicitly
specifying the minimalPut behavior.
|
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 |
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)
Called after we have finished the attempted invalidation of the entire
region
|
public CollectionAccessStrategyAdapter(CollectionRegion region, CacheConcurrencyStrategy ccs, Settings settings)
public CollectionRegion getRegion()
CollectionRegionAccessStrategygetRegion in interface CollectionRegionAccessStrategypublic Object get(Object key, long txTimestamp) throws CacheException
CollectionRegionAccessStrategyget in interface CollectionRegionAccessStrategykey - The key of the item to be retrieved.txTimestamp - a timestamp prior to the transaction start timeCacheException - Propogated from underlying Regionpublic boolean putFromLoad(Object key, Object value, long txTimestamp, Object version) throws CacheException
CollectionRegionAccessStrategyputFromLoad in interface CollectionRegionAccessStrategykey - The item keyvalue - The itemtxTimestamp - a timestamp prior to the transaction start timeversion - the item version numberCacheException - Propogated from underlying Regionpublic boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) throws CacheException
CollectionRegionAccessStrategyputFromLoad in interface CollectionRegionAccessStrategykey - 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 lockItem(Object key, Object version) throws CacheException
CollectionRegionAccessStrategylockItem in interface CollectionRegionAccessStrategykey - The key of the item to lockversion - The item's current version valueCacheException - Propogated from underlying Regionpublic SoftLock lockRegion() throws CacheException
CollectionRegionAccessStrategylockRegion in interface CollectionRegionAccessStrategyCacheException - Propogated from underlying Regionpublic void unlockItem(Object key, SoftLock lock) throws CacheException
CollectionRegionAccessStrategyunlockItem in interface CollectionRegionAccessStrategykey - The item keylock - The lock previously obtained from CollectionRegionAccessStrategy.lockItem(java.lang.Object, java.lang.Object)CacheException - Propogated from underlying Regionpublic void unlockRegion(SoftLock lock) throws CacheException
CollectionRegionAccessStrategyunlockRegion in interface CollectionRegionAccessStrategylock - The lock previously obtained from CollectionRegionAccessStrategy.lockRegion()CacheException - Propogated from underlying Regionpublic void remove(Object key) throws CacheException
CollectionRegionAccessStrategyremove in interface CollectionRegionAccessStrategykey - The key of the item to removeCacheException - Propogated from underlying Regionpublic void removeAll()
throws CacheException
CollectionRegionAccessStrategyremoveAll in interface CollectionRegionAccessStrategyCacheException - Propogated from underlying Regionpublic void evict(Object key) throws CacheException
CollectionRegionAccessStrategyevict in interface CollectionRegionAccessStrategykey - The key of the item to removeCacheException - Propogated from underlying Regionpublic void evictAll()
throws CacheException
CollectionRegionAccessStrategyevictAll in interface CollectionRegionAccessStrategyCacheException - Propogated from underlying Regionpublic void destroy()
Copyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved