@Deprecated public class EhcacheReadWriteCache extends Object
This is the Ehcache specific equivalent to Hibernate's ReadWriteCache. This implementation uses a more robust soft-lock system (less prone to accidental collisions).
| Modifier and Type | Field and Description |
|---|---|
protected EhCache |
cache
Deprecated.
Ehcache instance this strategy accesses.
|
| Constructor and Description |
|---|
EhcacheReadWriteCache()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterInsert(Object key,
Object value,
Object version)
Deprecated.
|
boolean |
afterUpdate(Object key,
Object value,
Object version,
org.hibernate.cache.access.SoftLock softlock)
Deprecated.
|
void |
clear()
Deprecated.
|
void |
destroy()
Deprecated.
|
void |
evict(Object key)
Deprecated.
A No-Op, since we are an asynchronous cache concurrency strategy.
|
Object |
get(Object key,
long txTimestamp)
Deprecated.
|
org.hibernate.cache.Cache |
getCache()
Deprecated.
|
String |
getRegionName()
Deprecated.
|
boolean |
insert(Object key,
Object value,
Object currentVersion)
Deprecated.
A No-Op, since we are an asynchronous cache concurrency strategy.
|
org.hibernate.cache.access.SoftLock |
lock(Object key,
Object version)
Deprecated.
Soft-locks the associated mapping prior to updating/inserting a new value.
|
boolean |
put(Object key,
Object value,
long txTimestamp,
Object version,
Comparator versionComparator,
boolean minimalPut)
Deprecated.
|
void |
release(Object key,
org.hibernate.cache.access.SoftLock lock)
Deprecated.
Soft-unlocks the associated mapping.
|
void |
remove(Object key)
Deprecated.
|
void |
setCache(org.hibernate.cache.Cache cache)
Deprecated.
|
boolean |
update(Object key,
Object value,
Object currentVersion,
Object previousVersion)
Deprecated.
A No-Op, since we are an asynchronous cache concurrency strategy.
|
protected EhCache cache
public Object get(Object key, long txTimestamp) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic boolean put(Object key, Object value, long txTimestamp, Object version, Comparator versionComparator, boolean minimalPut) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic org.hibernate.cache.access.SoftLock lock(Object key, Object version) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic void release(Object key, org.hibernate.cache.access.SoftLock lock) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic boolean afterUpdate(Object key, Object value, Object version, org.hibernate.cache.access.SoftLock softlock) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic boolean afterInsert(Object key, Object value, Object version) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic void evict(Object key) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic boolean update(Object key, Object value, Object currentVersion, Object previousVersion) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic boolean insert(Object key, Object value, Object currentVersion) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic final void setCache(org.hibernate.cache.Cache cache)
throws org.hibernate.cache.CacheException
setCache in interface org.hibernate.cache.CacheConcurrencyStrategyorg.hibernate.cache.CacheException - if the underlying cache is not an Ehcachepublic final org.hibernate.cache.Cache getCache()
getCache in interface org.hibernate.cache.CacheConcurrencyStrategypublic final String getRegionName()
getRegionName in interface org.hibernate.cache.CacheConcurrencyStrategypublic final void remove(Object key) throws org.hibernate.cache.CacheException
remove in interface org.hibernate.cache.CacheConcurrencyStrategyorg.hibernate.cache.CacheExceptionpublic final void clear()
throws org.hibernate.cache.CacheException
clear in interface org.hibernate.cache.CacheConcurrencyStrategyorg.hibernate.cache.CacheExceptionpublic final void destroy()
destroy in interface org.hibernate.cache.CacheConcurrencyStrategyCopyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.