NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
> i think if you set > minElementsInMemory = 0 > then it will remove all unlocked elements every period seconds. this isnt > exactly what you want, but its closer Sounds promising - what exactly is meant by a "locked" file in this context? Cheers, Jon On Mon, Sep 28, 2009 at 8:34 PM, John Caron <caron@xxxxxxxxxxxxxxxx> wrote: > Jon Blower wrote: >> >> Dear all (esp. John), >> >> I think I have been misunderstanding the intended behaviour of the >> cache of NetCDF files (the one that's initialized with >> NetcdfDataset.initNetcdfFileCache()). >> >> What is the behaviour of the "periodic cleanup"? Does it remove >> elements from memory only when the number of elements in memory >> exceeds a certain number? Or does it also remove elements based on >> their age? >> >> The behaviour I would like is the latter - i.e. I would like to be >> able to guarantee that the elements in the cache are no older than, >> say, five minutes. But this isn't the behaviour I'm seeing: elements >> seem to persist essentially for ever. So perhaps the former behaviour >> is the correct one? In which case, how would you recommend I >> implement the latter behaviour? >> > > static public void initNetcdfFileCache(int minElementsInMemory, int > maxElementsInMemory, int hardLimit, int period) { > > i think if you set > > minElementsInMemory = 0 > > then it will remove all unlocked elements every period seconds. this isnt > exactly what you want, but its closer > > -- Dr Jon Blower Technical Director, Reading e-Science Centre Environmental Systems Science Centre University of Reading Harry Pitt Building, 3 Earley Gate Reading RG6 6AL. UK Tel: +44 (0)118 378 5213 Fax: +44 (0)118 378 6413 j.d.blower@xxxxxxxxxxxxx http://www.nerc-essc.ac.uk/People/Staff/Blower_J.htm
netcdf-java
archives: