1 package org.apache.jcs.auxiliary;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import java.io.IOException;
23 import java.io.Serializable;
24 import java.util.Set;
25
26 import org.apache.jcs.engine.CacheConstants;
27 import org.apache.jcs.engine.behavior.ICache;
28 import org.apache.jcs.engine.behavior.ICacheElement;
29 import org.apache.jcs.engine.stats.behavior.IStats;
30
31 /***
32 * Mock auxiliary for unit tests.
33 * <p>
34 * @author Aaron Smuts
35 */
36 public class AuxiliaryCacheMockImpl
37 implements AuxiliaryCache
38 {
39 private static final long serialVersionUID = 1L;
40
41 /*** Can setup the cache type */
42 public int cacheType = ICache.DISK_CACHE;
43
44 /*** Can setup status */
45 public int status = CacheConstants.STATUS_ALIVE;
46
47 /*
48 * (non-Javadoc)
49 * @see org.apache.jcs.auxiliary.AuxiliaryCache#update(org.apache.jcs.engine.behavior.ICacheElement)
50 */
51 public void update( ICacheElement ce )
52 throws IOException
53 {
54 // TODO Auto-generated method stub
55
56 }
57
58 /*
59 * (non-Javadoc)
60 * @see org.apache.jcs.auxiliary.AuxiliaryCache#get(java.io.Serializable)
61 */
62 public ICacheElement get( Serializable key )
63 throws IOException
64 {
65 // TODO Auto-generated method stub
66 return null;
67 }
68
69 /*
70 * (non-Javadoc)
71 * @see org.apache.jcs.auxiliary.AuxiliaryCache#remove(java.io.Serializable)
72 */
73 public boolean remove( Serializable key )
74 throws IOException
75 {
76 // TODO Auto-generated method stub
77 return false;
78 }
79
80 /*
81 * (non-Javadoc)
82 * @see org.apache.jcs.auxiliary.AuxiliaryCache#removeAll()
83 */
84 public void removeAll()
85 throws IOException
86 {
87 // TODO Auto-generated method stub
88
89 }
90
91 /*
92 * (non-Javadoc)
93 * @see org.apache.jcs.auxiliary.AuxiliaryCache#dispose()
94 */
95 public void dispose()
96 throws IOException
97 {
98 // TODO Auto-generated method stub
99
100 }
101
102 /*
103 * (non-Javadoc)
104 * @see org.apache.jcs.auxiliary.AuxiliaryCache#getSize()
105 */
106 public int getSize()
107 {
108 // TODO Auto-generated method stub
109 return 0;
110 }
111
112 /*
113 * (non-Javadoc)
114 * @see org.apache.jcs.auxiliary.AuxiliaryCache#getStatus()
115 */
116 public int getStatus()
117 {
118 // TODO Auto-generated method stub
119 return status;
120 }
121
122 /*
123 * (non-Javadoc)
124 * @see org.apache.jcs.auxiliary.AuxiliaryCache#getCacheName()
125 */
126 public String getCacheName()
127 {
128 // TODO Auto-generated method stub
129 return null;
130 }
131
132 /*
133 * (non-Javadoc)
134 * @see org.apache.jcs.auxiliary.AuxiliaryCache#getGroupKeys(java.lang.String)
135 */
136 public Set getGroupKeys( String group )
137 throws IOException
138 {
139 // TODO Auto-generated method stub
140 return null;
141 }
142
143 /*
144 * (non-Javadoc)
145 * @see org.apache.jcs.auxiliary.AuxiliaryCache#getStatistics()
146 */
147 public IStats getStatistics()
148 {
149 // TODO Auto-generated method stub
150 return null;
151 }
152
153 /*
154 * (non-Javadoc)
155 * @see org.apache.jcs.engine.behavior.ICache#getStats()
156 */
157 public String getStats()
158 {
159 // TODO Auto-generated method stub
160 return null;
161 }
162
163 /*
164 * (non-Javadoc)
165 * @see org.apache.jcs.engine.behavior.ICacheType#getCacheType()
166 */
167 public int getCacheType()
168 {
169 return cacheType;
170 }
171
172 /***
173 * @return Returns the AuxiliaryCacheAttributes.
174 */
175 public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
176 {
177 return null;
178 }
179 }