-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCoherenceCache.java
More file actions
54 lines (41 loc) · 1.02 KB
/
CoherenceCache.java
File metadata and controls
54 lines (41 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import org.springframework.cache.Cache;
import org.springframework.cache.support.SimpleValueWrapper;
import com.tangosol.net.NamedCache;
public class CoherenceCache implements Cache {
private final NamedCache cache;
public CoherenceCache(NamedCache _cache)
{
cache=_cache;
}
@Override
public void clear() {
// TODO Auto-generated method stub
this.cache.clear();
}
@Override
public void evict(Object key) {
// TODO Auto-generated method stub
this.cache.remove(key);
}
@Override
public ValueWrapper get(Object key) {
// TODO Auto-generated method stub
Object element = this.cache.get(key);
return (element != null ? new SimpleValueWrapper(element) : null);
}
@Override
public String getName() {
// TODO Auto-generated method stub
return this.cache.getCacheName();
}
@Override
public Object getNativeCache() {
// TODO Auto-generated method stub
return this.cache;
}
@Override
public void put(Object key, Object val) {
// TODO Auto-generated method stub
this.cache.put(key,val);
}
}