public class ReadOnlyEhcacheEntityRegionAccessStrategy extends AbstractEhcacheAccessStrategy<EhcacheEntityRegion> implements org.hibernate.cache.access.EntityRegionAccessStrategy
region, settings
Constructor and Description |
---|
ReadOnlyEhcacheEntityRegionAccessStrategy(EhcacheEntityRegion region,
org.hibernate.cfg.Settings settings)
Create a read-only access strategy accessing the given entity region.
|
Modifier and Type | Method and Description |
---|---|
boolean |
afterInsert(java.lang.Object key,
java.lang.Object value,
java.lang.Object version) |
boolean |
afterUpdate(java.lang.Object key,
java.lang.Object value,
java.lang.Object currentVersion,
java.lang.Object previousVersion,
org.hibernate.cache.access.SoftLock lock)
Throws UnsupportedOperationException since this cache is read-only
|
java.lang.Object |
get(java.lang.Object key,
long txTimestamp) |
org.hibernate.cache.EntityRegion |
getRegion() |
boolean |
insert(java.lang.Object key,
java.lang.Object value,
java.lang.Object version)
This cache is asynchronous hence a no-op
|
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
|
boolean |
update(java.lang.Object key,
java.lang.Object value,
java.lang.Object currentVersion,
java.lang.Object previousVersion)
Throws UnsupportedOperationException since this cache is read-only
|
evict, evictAll, lockRegion, putFromLoad, remove, removeAll, unlockRegion
public ReadOnlyEhcacheEntityRegionAccessStrategy(EhcacheEntityRegion region, org.hibernate.cfg.Settings settings)
public org.hibernate.cache.EntityRegion getRegion()
getRegion
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
public java.lang.Object get(java.lang.Object key, long txTimestamp) throws org.hibernate.cache.CacheException
get
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
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.EntityRegionAccessStrategy
putFromLoad
in class AbstractEhcacheAccessStrategy<EhcacheEntityRegion>
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.EntityRegionAccessStrategy
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.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
public boolean insert(java.lang.Object key, java.lang.Object value, java.lang.Object version) throws org.hibernate.cache.CacheException
insert
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
public boolean afterInsert(java.lang.Object key, java.lang.Object value, java.lang.Object version) throws org.hibernate.cache.CacheException
afterInsert
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
org.hibernate.cache.CacheException
public boolean update(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion) throws java.lang.UnsupportedOperationException
update
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
java.lang.UnsupportedOperationException
- alwayspublic boolean afterUpdate(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion, org.hibernate.cache.access.SoftLock lock) throws java.lang.UnsupportedOperationException
afterUpdate
in interface org.hibernate.cache.access.EntityRegionAccessStrategy
java.lang.UnsupportedOperationException
- always