1 package org.activestack.framework.cache;
2
3 /**
4 * Factory class used to instantiate concrete implementation of interface, or maybe use your IoC / injection tool of choice...
5 */
6 public final class ASCacheFactory {
7
8 /**
9 * Private constructor to prevent instantiation of factory.
10 */
11 private ASCacheFactory() {
12 }
13
14 /**
15 * @return an cache implementation
16 */
17 public static ASCache create(final String implClassname) {
18 // @todo Add logic to load a real cache impl, who's class likely lives in some other jar on the classpath.
19 return new ASCache() {
20 public void put(Object key, Object value) {
21
22 }
23
24 public Object get(Object key) {
25 return null;
26 }
27
28 public Object remove(Object key) {
29 return null;
30 }
31
32 public long size() {
33 return 0;
34 }
35
36 public void clear() {
37
38 }
39 };
40 }
41 }