1 package org.apache.commons.jcs3.auxiliary;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.IOException;
23 import java.util.HashMap;
24 import java.util.Map;
25 import java.util.Set;
26
27 import org.apache.commons.jcs3.engine.CacheStatus;
28 import org.apache.commons.jcs3.engine.behavior.ICacheElement;
29 import org.apache.commons.jcs3.engine.stats.behavior.IStats;
30
31
32
33
34 public class MockAuxiliaryCache<K, V>
35 extends AbstractAuxiliaryCache<K, V>
36 {
37
38 public CacheType cacheType = CacheType.DISK_CACHE;
39
40
41 public CacheStatus status = CacheStatus.ALIVE;
42
43
44 public int getMatchingCallCount;
45
46
47
48
49
50 @Override
51 public void update( final ICacheElement<K, V> ce )
52 throws IOException
53 {
54
55
56 }
57
58
59
60
61
62
63 @Override
64 public ICacheElement<K, V> get( final K key )
65 throws IOException
66 {
67
68 return null;
69 }
70
71
72
73
74
75
76 @Override
77 public Map<K, ICacheElement<K, V>> getMatching(final String pattern)
78 throws IOException
79 {
80 getMatchingCallCount++;
81 return new HashMap<>();
82 }
83
84
85
86
87
88
89
90
91 @Override
92 public Map<K, ICacheElement<K, V>> getMultiple(final Set<K> keys)
93 {
94 return new HashMap<>();
95 }
96
97
98
99
100
101
102 @Override
103 public boolean remove( final K key )
104 throws IOException
105 {
106
107 return false;
108 }
109
110
111
112
113 @Override
114 public void removeAll()
115 throws IOException
116 {
117
118
119 }
120
121
122
123
124 @Override
125 public void dispose()
126 throws IOException
127 {
128
129
130 }
131
132
133
134
135 @Override
136 public int getSize()
137 {
138
139 return 0;
140 }
141
142
143
144
145 @Override
146 public CacheStatus getStatus()
147 {
148 return status;
149 }
150
151
152
153
154 @Override
155 public String getCacheName()
156 {
157 return null;
158 }
159
160
161
162
163
164
165 @Override
166 public Set<K> getKeySet() throws IOException
167 {
168 return null;
169 }
170
171
172
173
174 @Override
175 public IStats getStatistics()
176 {
177 return null;
178 }
179
180
181
182
183 @Override
184 public String getStats()
185 {
186 return null;
187 }
188
189
190
191
192 @Override
193 public CacheType getCacheType()
194 {
195 return cacheType;
196 }
197
198
199
200
201 @Override
202 public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
203 {
204 return null;
205 }
206
207
208 @Override
209 public String getEventLoggingExtraInfo()
210 {
211 return null;
212 }
213 }