|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.lenya.ac.cache.SourceCacheImpl
public class SourceCacheImpl
Basic implementation of a source cache.
Field Summary | |
---|---|
protected static int |
CAPACITY
|
Fields inherited from interface org.apache.lenya.ac.cache.SourceCache |
---|
ROLE |
Constructor Summary | |
---|---|
SourceCacheImpl()
Ctor. |
Method Summary | |
---|---|
protected java.lang.Object |
buildObject(java.lang.String sourceUri,
InputStreamBuilder builder)
Returns the input stream to read a source from. |
void |
dispose()
|
java.lang.Object |
get(java.lang.String sourceUri,
InputStreamBuilder builder)
Returns a cached object or builds a new object when the cached object does not exist or is not up to date. |
protected org.apache.lenya.util.CacheMap |
getCache()
Returns the cache. |
org.apache.avalon.framework.service.ServiceManager |
getManager()
Returns the service manager. |
org.apache.excalibur.source.SourceResolver |
getResolver()
Returns the source resolver. |
protected org.apache.excalibur.source.SourceValidity |
getSourceValidity(java.lang.String sourceUri)
Returns the validity of a source. |
void |
service(org.apache.avalon.framework.service.ServiceManager _manager)
|
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 |
---|
protected static final int CAPACITY
Constructor Detail |
---|
public SourceCacheImpl()
Method Detail |
---|
public org.apache.avalon.framework.service.ServiceManager getManager()
public org.apache.excalibur.source.SourceResolver getResolver()
protected org.apache.lenya.util.CacheMap getCache()
public java.lang.Object get(java.lang.String sourceUri, InputStreamBuilder builder) throws CachingException
SourceCache
get
in interface SourceCache
sourceUri
- The URI to build the source from.builder
- The builder to create a new object if needed.
CachingException
- when something went wrong.SourceCache.get(java.lang.String, org.apache.lenya.ac.cache.InputStreamBuilder)
protected java.lang.Object buildObject(java.lang.String sourceUri, InputStreamBuilder builder) throws java.net.MalformedURLException, java.io.IOException, org.apache.excalibur.source.SourceNotFoundException, BuildException
sourceUri
- The URI of the source.builder
- The input stream builder that should be used.
java.net.MalformedURLException
- when an error occurs.
java.io.IOException
- when an error occurs.
org.apache.excalibur.source.SourceNotFoundException
- when an error occurs.
BuildException
- if an error occurs.protected org.apache.excalibur.source.SourceValidity getSourceValidity(java.lang.String sourceUri) throws java.net.MalformedURLException, java.io.IOException
sourceUri
- The URI of the source.
java.net.MalformedURLException
- when an error occurs.
java.io.IOException
- when an error occurs.public void service(org.apache.avalon.framework.service.ServiceManager _manager) throws org.apache.avalon.framework.service.ServiceException
service
in interface org.apache.avalon.framework.service.Serviceable
org.apache.avalon.framework.service.ServiceException
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
Disposable.dispose()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |