public class ReadOnlyEhcacheCollectionRegionAccessStrategy extends AbstractEhcacheAccessStrategy<EhcacheCollectionRegion> implements org.hibernate.cache.access.CollectionRegionAccessStrategy
region, settings
Constructor and Description |
---|
ReadOnlyEhcacheCollectionRegionAccessStrategy(EhcacheCollectionRegion region,
org.hibernate.cfg.Settings settings)
Create a read-only access strategy accessing the given collection region.
|
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)
Throws UnsupportedOperationException since this cache is read-only
|
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 |
unlockItem(java.lang.Object key,
org.hibernate.cache.access.SoftLock lock)
A no-op since this cache is read-only
|
evict, evictAll, lockRegion, putFromLoad, remove, removeAll, unlockRegion
public ReadOnlyEhcacheCollectionRegionAccessStrategy(EhcacheCollectionRegion region, org.hibernate.cfg.Settings settings)
public org.hibernate.cache.CollectionRegion getRegion()
getRegion
in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
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 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 org.hibernate.cache.access.SoftLock lockItem(java.lang.Object key, java.lang.Object version) throws java.lang.UnsupportedOperationException
lockItem
in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
java.lang.UnsupportedOperationException
- alwayspublic 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