public class ReadOnlyCache extends Object implements CacheConcurrencyStrategy
CacheConcurrencyStrategy| Constructor and Description |
|---|
ReadOnlyCache() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterInsert(Object key,
Object value,
Object version)
Do nothing.
|
boolean |
afterUpdate(Object key,
Object value,
Object version,
SoftLock lock)
Unsupported!
|
void |
clear()
Evict all items from the cache immediately.
|
void |
destroy()
Clean up all resources.
|
void |
evict(Object key)
Do nothing.
|
Object |
get(Object key,
long timestamp)
Attempt to retrieve an object from the cache.
|
Cache |
getCache()
Get the wrapped cache implementation
|
String |
getRegionName()
Get the cache region name
|
boolean |
insert(Object key,
Object value,
Object currentVersion)
Do nothing.
|
SoftLock |
lock(Object key,
Object version)
Unsupported!
|
boolean |
put(Object key,
Object value,
long timestamp,
Object version,
Comparator versionComparator,
boolean minimalPut)
Attempt to cache an object, after loading from the database.
|
void |
release(Object key,
SoftLock lock)
Unsupported!
|
void |
remove(Object key)
Evict an item from the cache immediately (without regard for transaction
isolation).
|
void |
setCache(Cache cache)
Set the underlying cache implementation.
|
String |
toString() |
boolean |
update(Object key,
Object value,
Object currentVersion,
Object previousVersion)
Unsupported!
|
public void setCache(Cache cache)
CacheConcurrencyStrategysetCache in interface CacheConcurrencyStrategypublic Cache getCache()
CacheConcurrencyStrategygetCache in interface CacheConcurrencyStrategypublic String getRegionName()
CacheConcurrencyStrategygetRegionName in interface CacheConcurrencyStrategypublic Object get(Object key, long timestamp) throws CacheException
CacheConcurrencyStrategyget in interface CacheConcurrencyStrategytimestamp - a timestamp prior to the transaction start timeCacheExceptionpublic SoftLock lock(Object key, Object version)
lock in interface CacheConcurrencyStrategypublic boolean put(Object key, Object value, long timestamp, Object version, Comparator versionComparator, boolean minimalPut) throws CacheException
CacheConcurrencyStrategyput in interface CacheConcurrencyStrategytimestamp - a timestamp prior to the transaction start timeversion - the item version numberversionComparator - a comparator used to compare version numbersminimalPut - indicates that the cache should avoid a put is the item is already cachedCacheExceptionpublic void release(Object key, SoftLock lock)
release in interface CacheConcurrencyStrategypublic void clear()
throws CacheException
CacheConcurrencyStrategyclear in interface CacheConcurrencyStrategyCacheExceptionpublic void remove(Object key) throws CacheException
CacheConcurrencyStrategyremove in interface CacheConcurrencyStrategyCacheExceptionpublic void destroy()
CacheConcurrencyStrategydestroy in interface CacheConcurrencyStrategypublic boolean afterUpdate(Object key, Object value, Object version, SoftLock lock) throws CacheException
afterUpdate in interface CacheConcurrencyStrategyCacheExceptionpublic boolean afterInsert(Object key, Object value, Object version) throws CacheException
afterInsert in interface CacheConcurrencyStrategyCacheExceptionpublic void evict(Object key) throws CacheException
evict in interface CacheConcurrencyStrategyCacheExceptionpublic boolean insert(Object key, Object value, Object currentVersion)
insert in interface CacheConcurrencyStrategypublic boolean update(Object key, Object value, Object currentVersion, Object previousVersion)
update in interface CacheConcurrencyStrategyCopyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved