1 package org.apache.commons.jcs.engine;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.commons.jcs.engine.behavior.ICacheElement;
23 import org.apache.commons.jcs.engine.behavior.ICacheService;
24 import org.apache.commons.jcs.engine.behavior.IZombie;
25 import org.apache.commons.logging.Log;
26 import org.apache.commons.logging.LogFactory;
27
28 import java.io.Serializable;
29 import java.util.Collections;
30 import java.util.Map;
31 import java.util.Set;
32
33
34
35
36 public class ZombieCacheService<K, V>
37 implements ICacheService<K, V>, IZombie
38 {
39
40 private static final Log log = LogFactory.getLog( ZombieCacheService.class );
41
42
43
44
45 public void put( ICacheElement<K, V> item )
46 {
47 if ( log.isDebugEnabled() )
48 {
49 log.debug( "Zombie put for item " + item );
50 }
51
52 }
53
54
55
56
57
58
59 @Override
60 public void update( ICacheElement<K, V> item )
61 {
62
63 }
64
65
66
67
68
69
70 @Override
71 public ICacheElement<K, V> get( String cacheName, K key )
72 {
73 return null;
74 }
75
76
77
78
79
80
81
82
83 @Override
84 public Map<K, ICacheElement<K, V>> getMultiple( String cacheName, Set<K> keys )
85 {
86 return Collections.emptyMap();
87 }
88
89
90
91
92
93
94
95
96 @Override
97 public Map<K, ICacheElement<K, V>> getMatching( String cacheName, String pattern )
98 {
99 return Collections.emptyMap();
100 }
101
102
103
104
105
106
107
108
109
110 public Serializable get( String cacheName, K key, boolean container )
111 {
112 if ( log.isDebugEnabled() )
113 {
114 log.debug( "Zombie get for key [" + key + "] cacheName [" + cacheName + "] container [" + container + "]" );
115 }
116
117 return null;
118 }
119
120
121
122
123
124 @Override
125 public void remove( String cacheName, K key )
126 {
127
128 }
129
130
131
132
133 @Override
134 public void removeAll( String cacheName )
135 {
136
137 }
138
139
140
141
142 @Override
143 public void dispose( String cacheName )
144 {
145
146 }
147
148
149
150
151 @Override
152 public void release()
153 {
154
155 }
156 }