org.apache.turbine.services.cache
Class TurbineGlobalCache
java.lang.Object
|
+--org.apache.turbine.services.cache.TurbineGlobalCache
- public abstract class TurbineGlobalCache
- extends java.lang.Object
This is a Facade class for GlobalCacheService.
This class provides static methods that call related methods of the
implementation of the GlobalCacheService used by the System, according to
the settings in TurbineResources.
- Version:
- $Id: TurbineGlobalCache.java,v 1.2 2002/01/04 02:02:30 dlr Exp $
- Author:
- Sean Legassick
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
TurbineGlobalCache
public TurbineGlobalCache()
getService
protected static GlobalCacheService getService()
- Utility method for accessing the service
implementation
- Returns:
- a GlobalCacheService implementation instance
getObject
public static 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 static 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 static void removeObject(java.lang.String id)
- Removes an object from the cache.
- Parameters:
id
- The String id for the object.
getCacheSize
public static 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 static int getNumberOfObjects()
- Returns the number of objects in the cache.
- Returns:
- int The current number of objects in the cache.
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.