|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.cache.impl.EHCacheService
public class EHCacheService
Default implementation of EHCacheService
Field Summary | |
---|---|
static long |
DEFAULT_CACHE_CHECK_FREQUENCY
Cache check frequency in Millis (1000 Millis = 1 second). |
Fields inherited from interface org.apache.fulcrum.cache.GlobalCacheService |
---|
ROLE |
Constructor Summary | |
---|---|
EHCacheService()
|
Method Summary | |
---|---|
void |
addObject(String id,
CachedObject o)
Adds an object to the cache. |
void |
configure(org.apache.avalon.framework.configuration.Configuration config)
|
void |
dispose()
|
void |
flushCache()
Flush the cache of all objects. |
List |
getCachedObjects()
Returns a copy of the non-expired CachedObjects in the cache as a list. |
int |
getCacheSize()
Returns the current size of the cache. |
List |
getKeys()
Returns a copy of keys to objects in the cache as a list. |
int |
getNumberOfObjects()
Returns the number of objects in the cache. |
CachedObject |
getObject(String id)
Gets a cached object given its id (a String). |
void |
initialize()
|
void |
removeObject(String id)
Removes an object from the cache. |
void |
run()
Circle through the cache and refresh stale objects. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_CACHE_CHECK_FREQUENCY
Constructor Detail |
---|
public EHCacheService()
Method Detail |
---|
public void configure(org.apache.avalon.framework.configuration.Configuration config) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)
public void initialize() throws Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
Exception
Initializable.initialize()
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
Disposable.dispose()
public void addObject(String id, CachedObject o)
GlobalCacheService
addObject
in interface GlobalCacheService
id
- The String id for the object.o
- The object to add to the cache.GlobalCacheService.addObject(java.lang.String, org.apache.fulcrum.cache.CachedObject)
public void flushCache()
GlobalCacheService
flushCache
in interface GlobalCacheService
GlobalCacheService.flushCache()
public List getCachedObjects()
GlobalCacheService
getCachedObjects
in interface GlobalCacheService
CachedObject
objects held in the cacheGlobalCacheService.getCachedObjects()
public int getCacheSize() throws IOException
GlobalCacheService
getCacheSize
in interface GlobalCacheService
IOException
GlobalCacheService.getCacheSize()
public List getKeys()
GlobalCacheService
getKeys
in interface GlobalCacheService
String
's representing the keys to
objects in the cache.GlobalCacheService.getKeys()
public int getNumberOfObjects()
GlobalCacheService
getNumberOfObjects
in interface GlobalCacheService
GlobalCacheService.getNumberOfObjects()
public CachedObject getObject(String id) throws ObjectExpiredException
GlobalCacheService
getObject
in interface GlobalCacheService
id
- The String id for the object.
ObjectExpiredException
GlobalCacheService.getObject(java.lang.String)
public void removeObject(String id)
GlobalCacheService
removeObject
in interface GlobalCacheService
id
- The String id for the object.GlobalCacheService.removeObject(java.lang.String)
public void run()
run
in interface Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |