1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.mybatis.caches.ignite;
17
18 import java.util.concurrent.TimeUnit;
19 import java.util.concurrent.locks.Condition;
20 import java.util.concurrent.locks.Lock;
21 import java.util.concurrent.locks.ReadWriteLock;
22
23
24
25
26
27
28 class DummyReadWriteLock implements ReadWriteLock {
29
30
31 private Lock lock = new DummyLock();
32
33 @Override
34 public Lock readLock() {
35 return lock;
36 }
37
38 @Override
39 public Lock writeLock() {
40 return lock;
41 }
42
43
44
45
46 static class DummyLock implements Lock {
47
48 @Override
49 public void lock() {
50
51 }
52
53 @Override
54 public void lockInterruptibly() throws InterruptedException {
55
56 }
57
58 @Override
59 public boolean tryLock() {
60 return true;
61 }
62
63 @Override
64 public boolean tryLock(long paramLong, TimeUnit paramTimeUnit) throws InterruptedException {
65 return true;
66 }
67
68 @Override
69 public void unlock() {
70
71 }
72
73 @Override
74 public Condition newCondition() {
75 return null;
76 }
77 }
78
79 }