The "This keeps it atomic-ish" part sounds very good. However, I still
do not understand how Resources are handled well enough to understand
how I have to remember the date.
At the moment I am even wondering why we have both
ResourceLoader.isSourceModified()
and
ResourceLoader.getLastModified()
Probably they make sense _after_ I understand it all.
=:o\
I am busy with osme other stuff yet, but this will become my main
project in some hours.
=:o)
Thanks and get better Geir,
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Geir Magnusson Jr.
>
>
> Paulo Gaspar wrote:
> >
> > Messing up with that "performance waste" is a bit delicate. It
> > involves design decisions.
>
> Couldn't you take one of the following approachs :
>
> Since a resource is managed entirely by it's loader, why not let the
> loader simply read the timestamp of the resource during
> getResourceStream() and remember it. This keeps it atomic-ish. Then :
>
> 1) ResourceManager would get that timestamp and set it in the resource
> in getResource() like it does now, via a different call, such as
> resourceLoader.getResourceModified( resource )
>
> OR
>
> 2) Let the resource itself get the timestamp when it calls
> getResourceStream() from it's loader. This keeps the operation atomic
> as far as the ResourceManager is concerned.
>
> Either way, having the Loader maintain it seems the best thing, and
> neither of the above requires any serious design issue, right?
>
> geir
>