HHH-7350 - removed overridden methods in ReadOnlyAccess lock/unlock an instance and/or region of the cache, since inserts and deletes are allowed with a CacheConcurrencyStrategy of READ_ONLY.
This commit is contained in:
parent
8211c97ace
commit
665798339d
|
@ -1,32 +0,0 @@
|
||||||
package org.hibernate.cache.infinispan.entity;
|
|
||||||
|
|
||||||
import org.hibernate.cache.CacheException;
|
|
||||||
import org.hibernate.cache.spi.access.SoftLock;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A specialization of {@link TransactionalAccess} that ensures we never update data. Infinispan
|
|
||||||
* access is always transactional.
|
|
||||||
*
|
|
||||||
* @author Chris Bredesen
|
|
||||||
* @author Galder Zamarreño
|
|
||||||
* @since 3.5
|
|
||||||
*/
|
|
||||||
class ReadOnlyAccess extends TransactionalAccess {
|
|
||||||
|
|
||||||
ReadOnlyAccess(EntityRegionImpl region) {
|
|
||||||
super(region);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean update(Object key, Object value, Object currentVersion,
|
|
||||||
Object previousVersion) throws CacheException {
|
|
||||||
throw new UnsupportedOperationException("Illegal attempt to edit read only item");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean afterUpdate(Object key, Object value, Object currentVersion,
|
|
||||||
Object previousVersion, SoftLock lock) throws CacheException {
|
|
||||||
throw new UnsupportedOperationException("Illegal attempt to edit read only item");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue