org.apache.cocoon.woody
Class DefaultCacheManager

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.woody.DefaultCacheManager
All Implemented Interfaces:
Disposable, Component, Configurable, LogEnabled, Serviceable, ThreadSafe, CacheManager

public class DefaultCacheManager
extends AbstractLogEnabled
implements CacheManager, ThreadSafe, Serviceable, Disposable, Configurable, Component

Component implementing the CacheManager role.

Version:
$Id: DefaultCacheManager.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Field Summary
protected  org.apache.commons.collections.FastHashMap cache
           
protected  Configuration configuration
           
protected  ServiceManager manager
           
 
Fields inherited from interface org.apache.cocoon.woody.CacheManager
ROLE
 
Constructor Summary
DefaultCacheManager()
           
 
Method Summary
 void configure(Configuration configuration)
          Configurable
 void dispose()
          Disposable
 Object get(Source source, String prefix)
          Retrieves an object from the cache.
 void service(ServiceManager serviceManager)
           
 void set(Object object, Source source, String prefix)
          Saves an object in the cache.
 
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

manager

protected ServiceManager manager

configuration

protected Configuration configuration

cache

protected org.apache.commons.collections.FastHashMap cache
Constructor Detail

DefaultCacheManager

public DefaultCacheManager()
Method Detail

service

public void service(ServiceManager serviceManager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Configurable

Specified by:
configure in interface Configurable
Throws:
ConfigurationException

get

public Object get(Source source,
                  String prefix)
Description copied from interface: CacheManager
Retrieves an object from the cache.

Specified by:
get in interface CacheManager

set

public void set(Object object,
                Source source,
                String prefix)
         throws IOException
Description copied from interface: CacheManager
Saves an object in the cache.

Specified by:
set in interface CacheManager
Throws:
IOException

dispose

public void dispose()
Disposable

Specified by:
dispose in interface Disposable


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.