1 | public class OptimisticReadOnlyAccess extends OptimisticTransactionalAccess {↵ | | 1 | public class ReadOnlyAccess extends TransactionalAccess {↵
|
2 | private static final Logger log = LoggerFactory.getLogger(OptimisticReadOnlyAccess.class);↵ | | 2 | private static final Logger log = LoggerFactory.getLogger(ReadOnlyAccess.class);↵
|
|
3 | public OptimisticReadOnlyAccess(EntityRegionImpl region) {↵ | | 3 | public ReadOnlyAccess(EntityRegionImpl region) {↵
|
4 | super(region);↵ | | 4 | super(region);↵
|
5 | }↵ | | 5 | }↵
|
|
6 | @Override↵ | | 6 | @Override↵
|
7 | public SoftLock lockItem(Object key, Object version) throws CacheException {↵ | | 7 | public SoftLock lockItem(Object key, Object version) throws CacheException {↵
|
8 | throw new UnsupportedOperationException("Illegal attempt to edit read only item");↵ | | 8 | throw new UnsupportedOperationException("Illegal attempt to edit read only item");↵
|
9 | }↵ | | 9 | }↵
|
|
10 | @Override↵ | | 10 | @Override↵
|
11 | public SoftLock lockRegion() throws CacheException {↵ | | 11 | public SoftLock lockRegion() throws CacheException {↵
|
12 | throw new UnsupportedOperationException("Illegal attempt to edit read only region");↵ | | 12 | throw new UnsupportedOperationException("Illegal attempt to edit read only region");↵
|
13 | }↵ | | 13 | }↵
|
|
14 | @Override↵ | | 14 | @Override↵
|
15 | public void unlockItem(Object key, SoftLock lock) throws CacheException {↵ | | 15 | public void unlockItem(Object key, SoftLock lock) throws CacheException {↵
|
16 | log.error("Illegal attempt to edit read only item");↵ | | 16 | log.error("Illegal attempt to edit read only item");↵
|
17 | }↵ | | 17 | }↵
|
|
18 | @Override↵ | | 18 | @Override↵
|
19 | public void unlockRegion(SoftLock lock) throws CacheException {↵ | | 19 | public void unlockRegion(SoftLock lock) throws CacheException {↵
|
20 | log.error("Illegal attempt to edit read only region");↵ | | 20 | log.error("Illegal attempt to edit read only region");↵
|
21 | }↵ | | 21 | }↵
|
|
22 | @Override↵ | | 22 | @Override↵
|
23 | public boolean update(Object key, Object value, Object currentVersion, Object previousVersion)↵ | | 23 | public boolean update(Object key, Object value, Object currentVersion, Object previousVersion)↵
|
24 | throws CacheException {↵ | | 24 | throws CacheException {↵
|
25 | throw new UnsupportedOperationException("Illegal attempt to edit read only item");↵ | | 25 | throw new UnsupportedOperationException("Illegal attempt to edit read only item");↵
|
26 | }↵ | | 26 | }↵
|
|
27 | @Override↵ | | 27 | @Override↵
|
28 | public boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock)↵ | | 28 | public boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock)↵
|
29 | throws CacheException {↵ | | 29 | throws CacheException {↵
|
30 | throw new UnsupportedOperationException("Illegal attempt to edit read only item") | | 30 | throw new UnsupportedOperationException("Illegal attempt to edit read only item")
|