Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 94618 invoked from network); 13 Aug 2009 07:53:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Aug 2009 07:53:24 -0000 Received: (qmail 77038 invoked by uid 500); 13 Aug 2009 07:53:30 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 76912 invoked by uid 500); 13 Aug 2009 07:53:30 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 76901 invoked by uid 99); 13 Aug 2009 07:53:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Aug 2009 07:53:30 +0000 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jak-commons-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Aug 2009 07:53:19 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MbV7J-0006aR-VE for dev@commons.apache.org; Thu, 13 Aug 2009 07:52:57 +0000 Received: from mail.elsag-solutions.com ([62.154.225.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Aug 2009 07:52:57 +0000 Received: from joerg.schaible by mail.elsag-solutions.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Aug 2009 07:52:57 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: dev@commons.apache.org From: =?UTF-8?B?SsO2cmc=?= Schaible Subject: Re: [vfs] VFS.getManager and FileCache Date: Thu, 13 Aug 2009 09:52:48 +0200 Lines: 35 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: mail.elsag-solutions.com User-Agent: KNode/0.10.9 Sender: news X-Virus-Checked: Checked by ClamAV on apache.org 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: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org