KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.Map JavaDoc;
21 import java.util.Set JavaDoc;
22
23 import org.sape.carbon.core.component.FunctionalInterface;
24 import org.sape.carbon.services.cache.CacheLoadException;
25
26 /**
27  * <p>The MultiGetMRUCacheDataLoader is the interface implemented by
28  * Objects that interface with the backing data store of an MRU cache.</p>
29  *
30  * Copyright 2002 Sapient
31  * @since carbon 1.0
32  * @author Douglas Voet, March 2002
33  * @version $Revision: 1.7 $($Author: dvoet $ / $Date: 2003/05/05 21:21:07 $)
34  */

35 public interface MultiGetMRUCacheDataLoader extends FunctionalInterface {
36     /**
37      * Loads data from the backing data store and returns it.
38      * This method is called from the getMulitple method of
39      * MultiGetMRUCache when some or all of the requested data is not in
40      * the cache or has expired. Only the keys of the missing or expired
41      * data are requested.
42      *
43      * @param keys a Set of identifying keys to be used to load
44      * their respective objects.
45      * @return a Map of data objects containing a value object for each key
46      * passed in <code>keys</code>. (Object) key from
47      * <code>keys</code> -> (Object) value. If a key does
48      * not have a corresponding value, it should be excluded from
49      * the Map returned.
50      *
51      * @throws CacheLoadException if the is an exception while loading data
52      */

53     Map JavaDoc loadData(Set JavaDoc keys) throws CacheLoadException;
54 }
55
56
Popular Tags