KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibatis > sqlmap > engine > cache > CacheController


1 /*
2  * Copyright 2004 Clinton Begin
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package com.ibatis.sqlmap.engine.cache;
17
18 import java.util.Properties JavaDoc;
19
20 /**
21  * Cache controller (implementation) interface
22  */

23 public interface CacheController {
24
25   /**
26    * Flush a cache model
27    *
28    * @param cacheModel - the model to flush
29    */

30   public void flush(CacheModel cacheModel);
31
32   /**
33    * Get an object from a cache model
34    *
35    * @param cacheModel - the model
36    * @param key - the key to the object
37    * @return the object if in the cache, or null(?)
38    */

39   public Object JavaDoc getObject(CacheModel cacheModel, Object JavaDoc key);
40
41   /**
42    * Remove an object from a cache model
43    *
44    * @param cacheModel - the model to remove the object from
45    * @param key - the key to the object
46    * @return the removed object(?)
47    */

48   public Object JavaDoc removeObject(CacheModel cacheModel, Object JavaDoc key);
49
50   /**
51    * Put an object into a cache model
52    *
53    * @param cacheModel - the model to add the object to
54    * @param key - the key to the object
55    * @param object - the object to add
56    */

57   public void putObject(CacheModel cacheModel, Object JavaDoc key, Object JavaDoc object);
58
59   /**
60    * Configure a cache controller
61    *
62    * @param props - the properties object continaing configuration information
63    */

64   public void configure(Properties JavaDoc props);
65
66 }
Popular Tags