commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject Re: [vfs] VFS.getManager and FileCache
Date Thu, 13 Aug 2009 07:52:48 GMT
Hi Mario,

coming back to this now again ... ;-)

Mario Ivankovits wrote at Donnerstag, 6. August 2009 17:36:

> Hi!
> Using weak ref as default seems not too bad. However, since the file
> objects have just their parent cached it might lead to much more file
> system access then now as a parent might need to refresh its children.
> I tried to kick a discussion about caching at all already [1].

Ah, yes, interesting.

> I still think going the mount/unmount way and leaving all the
> concurrency/threading issues up to the application makes more sense.

+1, we might provide a synchronizing wrapper like it is done with
Collections.synchronizedXXX() methods. Actually I'd deprecate the
FM.resolveFile here in favor to mount/unmount simply to make it explicit
that you're doing something fundamental different than with FO.resolveFile.

> Means, VFS is no longer thread safe by default and you have to deal with
> thread safety only if you use the object returned from mount() in
> differente threads. Also, by unmounting (equals filesystem.close()) we can
> easily get rid of any used underlaying resources.

Currently I am diving deeper into the code, since even with the
WeakRefFilesCache our connections to the SFTP server are not closed even
when we keep no reference to any FileObject anymore and they are GCed ...
go hunting ;-)

- Jörg

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

View raw message