cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: DelayedLastModified?
Date Tue, 18 Dec 2001 12:43:01 GMT


Carsten Ziegeler a écrit :
> 
> Hi Team,
> 
> could someone please explain what the DelayedLastModified class should
> be doing? Currently it is only imported in the Handler class, but not
> really used there, right?
> If it is experimental, we should move it to the scratchpad directory.
> 
> Cheers,
> Carsten
> 

Hi Carsten,

I wrote this class as part of the discussion about reducing filesystem
calls to check for modification dates. This was to show how this could
be done "passively" instead of using an active monitor.

The purpose if this class (as stated by the javadoc :) is to be a
front-end to a Source to delay actual calls to Source.getLastModified()
which can be costly. It ensures this method isn't called more that once
in each {delay} period, {delay} being the time in milliseconds specified
in the second argument of the constructor.

It *is* used by Handler to check the last modification date of the
sitemap file. This is for now the only place where it is used in the
main source tree (it's also used in the TreeProcessor I have on my PC,
which is nearly finished), and it could be used everywhere a Source
object is kept and its modification date checked regularly. A quick
search shows Cocoon, AbstractComplementaryConfigurableAction,
AbstractServerPage, and maybe others.

IMO this should be considered more as an optimization helper class than
a real experiment, since it doesn't add new features.

What do you think ?

Sylvain.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message