org.hibernate.cache
Class NonstrictReadWriteCache
java.lang.Object
org.hibernate.cache.NonstrictReadWriteCache
- CacheConcurrencyStrategy
public class NonstrictReadWriteCache
extends java.lang.Object
Caches data that is sometimes updated without ever locking the cache.
If concurrent access to an item is possible, this concurrency strategy
makes no guarantee that the item returned from the cache is the latest
version available in the database. Configure your cache timeout accordingly!
This is an "asynchronous" concurrency strategy.
boolean | afterInsert(Object key, Object value, Object version) - Do nothing.
|
boolean | afterUpdate(Object key, Object value, Object version, SoftLock lock) - Invalidate the item (again, for safety).
|
void | clear()
|
void | destroy()
|
void | evict(Object key) - Invalidate the item
|
Object | get(Object key, long txTimestamp) - Get the most recent version, if available.
|
Cache | getCache()
|
String | getRegionName()
|
boolean | insert(Object key, Object value, Object currentVersion) - Invalidate the item
|
SoftLock | lock(Object key, Object version) - Do nothing.
|
boolean | put(Object key, Object value, long txTimestamp, Object version, Comparator versionComparator, boolean minimalPut) - Add an item to the cache.
|
void | release(Object key, SoftLock lock) - Invalidate the item (again, for safety).
|
void | remove(Object key)
|
void | setCache(Cache cache)
|
String | toString()
|
boolean | update(Object key, Object value, Object currentVersion, Object previousVersion) - Do nothing.
|
NonstrictReadWriteCache
public NonstrictReadWriteCache()
put
public boolean put(Object key,
Object value,
long txTimestamp,
Object version,
Comparator versionComparator,
boolean minimalPut)
throws CacheException
Add an item to the cache.
- put in interface CacheConcurrencyStrategy
toString
public String toString()
update
public boolean update(Object key,
Object value,
Object currentVersion,
Object previousVersion)
Do nothing.
- update in interface CacheConcurrencyStrategy