KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > services > portletcache > PortletCacheService


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
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
17 package org.apache.jetspeed.services.portletcache;
18
19 import org.apache.turbine.services.Service;
20
21 /**
22  * <P>This service provides caching facilities for objects within the Jetspeed
23  * application</p>
24  *
25  * <strong>This interface is designed for backward compability with the
26  * previous memory cache interfaces. It may be deprecated once the caching
27  * API is refactored</strong>
28  *
29  * @author <a HREF="mailto:burton@apache.org">Kevin A. Burton</a>
30  * @author <a HREF="mailto:raphael@apache.org">Raphaël Luta</a>
31  * @version $Id: PortletCacheService.java,v 1.4 2004/02/23 03:34:54 jford Exp $
32  */

33 public interface PortletCacheService extends Service {
34
35     public String JavaDoc SERVICE_NAME = "PortletCache";
36         
37     /**
38      * Add a Cacheable object to the cache.
39      *
40      * @param item the object to store in the Cache
41      */

42     public void addCacheable( Cacheable item );
43     
44     /**
45      * Removes a Cacheable object from the cache based on its handle
46      *
47      * @param handle the identifier of the object to remove
48      */

49     public void removeCacheable( String JavaDoc handle );
50     
51     /**
52      * Retrieves a Cacheable object from the cache.
53      *
54      * @param handle the identifier of the object we wish to retrieve
55      * @return the cacehd object or null if not found
56      */

57     public Cacheable getCacheable( String JavaDoc handle );
58
59 }
60
61
Popular Tags