1 package org.apache.jcs.engine;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.Serializable;
23
24 import org.apache.commons.logging.Log;
25 import org.apache.commons.logging.LogFactory;
26 import org.apache.jcs.engine.behavior.ICacheElement;
27 import org.apache.jcs.engine.behavior.ICacheService;
28
29 import org.apache.jcs.engine.behavior.IZombie;
30
31 /***
32 * Zombie adapter for any cache service. balks at every call.
33 */
34 public class ZombieCacheService
35 implements ICacheService, IZombie
36 {
37
38 private static final Log log = LogFactory.getLog( ZombieCacheService.class );
39
40 /***
41 * @param item
42 */
43 public void put( ICacheElement item )
44 {
45 if ( log.isDebugEnabled() )
46 {
47 log.debug( "Zombie put for item " + item );
48 }
49
50 }
51
52
53
54
55
56 public void update( ICacheElement item )
57 {
58
59 }
60
61
62
63
64
65
66 public ICacheElement get( String cacheName, Serializable key )
67 {
68 return null;
69 }
70
71 /***
72 * Logs the get to debug, but always balks.
73 * <p>
74 * @param cacheName
75 * @param key
76 * @param container
77 * @return null always
78 */
79 public Serializable get( String cacheName, Serializable key, boolean container )
80 {
81 if ( log.isDebugEnabled() )
82 {
83 log.debug( "Zombie get for key [" + key + "] cacheName [" + cacheName + "] container [" + container + "]" );
84 }
85
86 return null;
87 }
88
89
90
91
92
93
94 public void remove( String cacheName, Serializable key )
95 {
96
97 }
98
99
100
101
102
103 public void removeAll( String cacheName )
104 {
105
106 }
107
108
109
110
111
112 public void dispose( String cacheName )
113 {
114
115 return;
116 }
117
118
119
120
121
122 public void release()
123 {
124
125 return;
126 }
127
128 }