KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > cache > CacheStore


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.excalibur.cache;
9
10 import java.util.Iterator JavaDoc;
11
12 /**
13  * Store cached objects.
14  *
15  * @author <a HREF="mailto:colus@apache.org">Eung-ju Park</a>
16  */

17 public interface CacheStore
18 {
19     /**
20      * Return capacity of store.
21      *
22      * @return capacity of store
23      */

24     int capacity();
25
26     /**
27      * Return size of store.
28      *
29      * @return the number of key-value mappings in this store.
30      */

31     int size();
32
33     boolean isFull();
34
35     /**
36      * @param key not null
37      * @param value may be null
38      */

39     Object JavaDoc put( Object JavaDoc key, Object JavaDoc value );
40
41     Object JavaDoc get( Object JavaDoc key );
42
43     Object JavaDoc remove( Object JavaDoc key );
44
45     boolean containsKey( Object JavaDoc key );
46
47    /**
48      * Return the array containing all key.
49      */

50     Object JavaDoc[] keys();
51 }
52
Popular Tags