KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > rolap > cache > SmartCache


1 /*
2 // This software is subject to the terms of the Common Public License
3 // Agreement, available at the following URL:
4 // http://www.opensource.org/licenses/cpl.html.
5 // Copyright (C) 2004-2005 TONBELLER AG
6 // All Rights Reserved.
7 // You must accept the terms of that agreement to use this software.
8 */

9 package mondrian.rolap.cache;
10
11 /**
12  * Defines a cache API. Implementations exist for hard and soft references.
13  *
14  * @author av
15  * @since Nov 21, 2005
16  * @version $Id: //open/mondrian/src/main/mondrian/rolap/cache/SmartCache.java#5 $
17  */

18 public interface SmartCache <K, V> {
19     /**
20      * Places a key/value pair into the queue.
21      *
22      * @param key Key
23      * @param value Value
24      * @return the previous value of <code>key</code> or null
25      */

26     V put(K key, V value);
27
28     V get(K key);
29
30     void clear();
31
32     int size();
33
34 }
35
36 // End SmartCache.java
37
Popular Tags