1 package org.apache.jcs.auxiliary.disk.jdbc;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.jcs.auxiliary.AuxiliaryCache;
23 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
24 import org.apache.jcs.auxiliary.AuxiliaryCacheFactory;
25 import org.apache.jcs.engine.behavior.ICompositeCacheManager;
26
27 /***
28 * This factory should create mysql disk caches.
29 * <p>
30 * @author Aaron Smuts
31 */
32 public class JDBCDiskCacheFactory
33 implements AuxiliaryCacheFactory
34 {
35 private String name = "JDBCDiskCacheFactory";
36
37 /***
38 * This factory method should create an instance of the mysqlcache.
39 */
40 public AuxiliaryCache createCache( AuxiliaryCacheAttributes rawAttr, ICompositeCacheManager arg1 )
41 {
42 JDBCDiskCacheManager mgr = JDBCDiskCacheManager.getInstance( (JDBCDiskCacheAttributes) rawAttr );
43 return mgr.getCache( (JDBCDiskCacheAttributes) rawAttr );
44 }
45
46 /***
47 * The name of the factory.
48 */
49 public void setName( String nameArg )
50 {
51 name = nameArg;
52 }
53
54 /***
55 * Returns the display name
56 */
57 public String getName()
58 {
59 return name;
60 }
61 }