org.keel.services.cache.turbine
Interface GlobalCacheService
- All Superinterfaces:
- Initializable, Service
- public interface GlobalCacheService
- extends Service
GlobalCacheService interface.
- Version:
- $Id: GlobalCacheService.java,v 1.1 2003/05/16 22:34:19 mprn Exp $
- Author:
SERVICE_NAME
public static final java.lang.String SERVICE_NAME
-
- See Also:
- Constant Field Values
getObject
public CachedObject getObject(java.lang.String id)
throws ObjectExpiredException
-
Gets a cached object given its id (a String).
-
-
- Parameters:
id - The String id for the object.
- Returns:
- A CachedObject.
- Throws:
ObjectExpiredException, - if the object has expired in the cache.
ObjectExpiredException
addObject
public void addObject(java.lang.String id,
CachedObject o)
-
Adds an object to the cache.
-
-
- Parameters:
id - The String id for the object.
o - The object to add to the cache.
removeObject
public void removeObject(java.lang.String id)
-
Removes an object from the cache.
-
-
- Parameters:
id - The String id for the object.
getCacheSize
public int getCacheSize()
throws java.io.IOException
-
Returns the current size of the cache.
-
-
- Returns:
- int representing current cache size in number of bytes
- Throws:
java.io.IOException
getNumberOfObjects
public int getNumberOfObjects()
-
Returns the number of objects in the cache.
-
-
- Returns:
- int The current number of objects in the cache.
flushCache
public void flushCache()
-
Flush the cache of all objects.
-
-
Please see keelframework.org for information about new Keel releases.