1 /***
2 * JFoxSOAF, Service-Oriented Application Framework
3 *
4 * Copyright (C) www.huihoo.org
5 *
6 * Distributable under GNU LGPL
7 *
8 * For more information, please visit: http://www.huihoo.org/jfox/jfoxsoaf
9 */
10
11 package org.huihoo.jfox.soaf.services.cache;
12
13 import org.huihoo.jfox.soaf.exception.*;
14
15 /***
16 * <p>
17 * Cache serivce, Wrapper service for simple cache.
18 * </p>
19 *
20 * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
21 * @version $Revision: 1.3 $ $Date: 2004/10/20 08:23:17 $
22 * @version Revision: 1.0
23 */
24
25 public interface SimpleCacheService {
26
27 /***
28 * Get an object from the cache
29 *
30 * @param key
31 * @return the cached object
32 * @throws CacheServiceException
33 */
34 public Object get(Object key) throws CacheServiceException;
35
36 /***
37 * Add an object to the cache
38 *
39 * @param key
40 * @param obj
41 * @throws CacheServiceException
42 */
43 public void put(Object key, Object obj) throws CacheServiceException;
44
45 /***
46 * Remove an object from the cache
47 */
48 public void remove(Object key) throws CacheServiceException;
49
50 /***
51 * Clear the cache
52 */
53 public void clear() throws CacheServiceException;
54
55 public int size();
56 }