commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Defoort <>
Subject Re: [VFS] FileObject.close rules
Date Fri, 21 Jul 2006 07:57:40 GMT
Thanks, Mario, that'll simplify things!

- Filip
PS: thanks for applying the other fix as well.

Mario Ivankovits wrote:
> Hi!
>> I'm digging through some older VFS based code, and I used to plaster
>> FileObject.close() through the code (essentially after each resolve) to
>> make sure I had current information.
>> With the new ON_RESOLVE cache strategy, is that still the recommended
>> way of doing things ?
> No, you can remove these lines of code - as you mentioned ON_RESOLVE
> will refresh the file-informations on each resolveFile()
>> Or can I just leave the FileObjects I need often open, do a
>> resolveFile() before
>> I use them. Will they still get kicked out of the cache this way ? (or
>> does
>> leaving a FileObject open lock it in memory)
> No, should not be the case, as soon as you have no reference to the
> object (and the JVM needs memory) it will be garbage collected.
>> It'd be great if someone could give some general guidelines on what the
>> intended usage patterns are with the new caching system...
> No other guideline then before, just, you do not need to call close() to
> refresh the file informations (=cacheStrategy) and - if you still would
> like to do it manually there is not a method called "refresh()" on the
> FileObject interface.
> Ciao,
> Mario
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message