public class TransactionalEhcacheCollectionRegionAccessStrategy extends AbstractEhcacheAccessStrategy<EhcacheCollectionRegion> implements org.hibernate.cache.access.CollectionRegionAccessStrategy
Modifier and Type | Field and Description |
---|---|
private Ehcache |
ehcache |
region, settings
Constructor and Description |
---|
TransactionalEhcacheCollectionRegionAccessStrategy(EhcacheCollectionRegion region,
Ehcache ehcache,
org.hibernate.cfg.Settings settings)
Construct a new collection region access strategy.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.Object key,
long txTimestamp) |
org.hibernate.cache.CollectionRegion |
getRegion() |
org.hibernate.cache.access.SoftLock |
lockItem(java.lang.Object key,
java.lang.Object version) |
boolean |
putFromLoad(java.lang.Object key,
java.lang.Object value,
long txTimestamp,
java.lang.Object version,
boolean minimalPutOverride)
This method is a placeholder for method signatures supplied by interfaces pulled in further down the class
hierarchy.
|
void |
remove(java.lang.Object key)
A no-op since this is an asynchronous cache access strategy.
|
void |
unlockItem(java.lang.Object key,
org.hibernate.cache.access.SoftLock lock) |
evict, evictAll, lockRegion, putFromLoad, removeAll, unlockRegion
private final Ehcache ehcache
public TransactionalEhcacheCollectionRegionAccessStrategy(EhcacheCollectionRegion region, Ehcache ehcache, org.hibernate.cfg.Settings settings)
region
- the Hibernate region.ehcache
- the cache.settings
- the Hibernate settings.public java.lang.Object get(java.lang.Object key, long txTimestamp) throws org.hibernate.cache.CacheException
get
in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
org.hibernate.cache.CacheException
public org.hibernate.cache.CollectionRegion getRegion()
getRegion
in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
public org.hibernate.cache.access.SoftLock lockItem(java.lang.Object key, java.lang.Object version) throws org.hibernate.cache.CacheException
lockItem
in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
org.hibernate.cache.CacheException
public boolean putFromLoad(java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version, boolean minimalPutOverride) throws org.hibernate.cache.CacheException
putFromLoad
in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
putFromLoad
in class AbstractEhcacheAccessStrategy<EhcacheCollectionRegion>
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object, boolean)
,
CollectionRegionAccessStrategy.putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object, boolean)
public void remove(java.lang.Object key) throws org.hibernate.cache.CacheException
remove
in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
remove
in class AbstractEhcacheAccessStrategy<EhcacheCollectionRegion>
org.hibernate.cache.CacheException
EntityRegionAccessStrategy.remove(java.lang.Object)
,
CollectionRegionAccessStrategy.remove(java.lang.Object)
public void unlockItem(java.lang.Object key, org.hibernate.cache.access.SoftLock lock) throws org.hibernate.cache.CacheException
unlockItem
in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
org.hibernate.cache.CacheException