| java.lang.Object org.apache.cocoon.components.source.DelayedRefreshSourceWrapper
DelayedRefreshSourceWrapper | final public class DelayedRefreshSourceWrapper implements Source,ModifiableSource,XMLizable(Code) | | A wrapper around a Source that reduces the number of calls to
Source.getLastModified() which can be a costly operation.
author: Sylvain Wallez version: CVS $Id: DelayedRefreshSourceWrapper.java 433543 2006-08-22 06:22:54Z crossley $ |
Constructor Summary | |
public | DelayedRefreshSourceWrapper(Source source, long delay) Creates a wrapper for a Source which ensures that
Source.getLastModified() won't be called more than once per
delay milliseconds period. |
DelayedRefreshSourceWrapper | public DelayedRefreshSourceWrapper(Source source, long delay)(Code) | | Creates a wrapper for a Source which ensures that
Source.getLastModified() won't be called more than once per
delay milliseconds period.
Parameters: source - the wrapped Source Parameters: delay - the last-modified refresh delay, in milliseconds |
getContentLength | final public long getContentLength()(Code) | | |
getLastModified | final public long getLastModified()(Code) | | Get the last modification time for the wrapped Source . The
age of the returned information is guaranteed to be lower than or equal to
the delay specified in the constructor.
This method is also thread-safe, even if the underlying Source is not.
the last modification time. |
recycle | final public void recycle()(Code) | | |
refresh | final public synchronized void refresh()(Code) | | Force the refresh of the wrapped Source , even if the refresh period
isn't over, and starts a new period.
This method is thread-safe, even if the underlying Source is not.
|
|
|