Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 15416 invoked from network); 21 Jul 2006 07:58:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 07:58:05 -0000 Received: (qmail 12797 invoked by uid 500); 21 Jul 2006 07:58:03 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 12244 invoked by uid 500); 21 Jul 2006 07:58:02 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 12232 invoked by uid 99); 21 Jul 2006 07:58:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 00:58:02 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [65.223.48.51] (HELO mail.cirquedigital.com) (65.223.48.51) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 00:58:00 -0700 Received: from [192.168.1.10] (70-32-208-184.ontrca.adelphia.net [70.32.208.184]) by mail.cirquedigital.com (Postfix) with ESMTP id AE43E2EE6A for ; Fri, 21 Jul 2006 00:57:39 -0700 (PDT) Message-ID: <44C088F4.3030505@cirquedigital.com> Date: Fri, 21 Jul 2006 00:57:40 -0700 From: Filip Defoort User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060516) MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: [VFS] FileObject.close rules References: <44C01AED.6070206@cirquedigital.com> <44C0886E.7090907@ops.co.at> In-Reply-To: <44C0886E.7090907@ops.co.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks, Mario, that'll simplify things! Cheers, - 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: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org