org.apache.turbine.services.cache
Interface GlobalCacheService
- All Superinterfaces:
- Initable, Service
- All Known Implementing Classes:
- TurbineGlobalCacheService
- public interface GlobalCacheService
- extends Service
GlobalCacheService interface.
- Version:
- $Id: GlobalCacheService.java,v 1.3 2002/01/30 16:11:21 dlr Exp $
- Author:
- Dave Bryson
SERVICE_NAME
public static final java.lang.String SERVICE_NAME
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.
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
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.
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.