KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > services > cache > mru > BaseMRUCacheConfiguration


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.services.cache.mru;
19
20 import org.sape.carbon.core.component.ComponentConfiguration;
21
22 /**
23  * The configuration interface for the DefaultMRUCacheImpl implementation.
24  *
25  * Copyright 2002 Sapient
26  * @since carbon 1.0
27  * @author Doug Voet, April 2002
28  * @version $Revision: 1.9 $($Author: dvoet $ / $Date: 2003/05/05 21:21:07 $)
29  */

30 public interface BaseMRUCacheConfiguration
31     extends ComponentConfiguration {
32
33     /**
34      * Capacity specifies the maximum number a data elements the cache can
35      * hold before it starts to drop the least recently used elements.
36      *
37      * @return the value of capacity
38      */

39     Integer JavaDoc getCapacity();
40
41     /**
42      * Capacity specifies the maximum number a data elements the cache can
43      * hold before it starts to drop the least recently used elements.
44      *
45      * @param capacity value of the capacity
46      */

47     void setCapacity(Integer JavaDoc capacity);
48
49     /**
50      * ExpirationInterval specifies the time after which a datum has been
51      * loaded into the cache it must be reloaded. If this value is not
52      * specifed, cached items will only be loaded if the cache is refreshed
53      * or if it falls out of the cache due to lack of use.
54      * @return Long
55      */

56     Long JavaDoc getExpirationInterval();
57
58     /**
59      * ExpirationInterval specifies the time after which a datum has been
60      * loaded into the cache it must be reloaded. If this value is not
61      * specifed, cached items will only be loaded if the cache is refreshed
62      * or if it falls out of the cache due to lack of use.
63      *
64      * @param expirationInterval value of the expiration interval
65      */

66     void setExpirationInterval(Long JavaDoc expirationInterval);
67 }
68
Popular Tags