/** * Enable file caching. call this before calling acquireFile(). * When application terminates, call NetcdfDataset.shutdown(). * * @param minElementsInMemory keep this number in the cache * @param maxElementsInMemory trigger a cleanup if it goes over this number. * @param hardLimit if > 0, never allow more than this many elements. This causes a cleanup to be done in the calling thread. * @param period (secs) do periodic cleanups every this number of seconds. */ static public void initNetcdfFileCache(int minElementsInMemory, int maxElementsInMemory, int hardLimit, int period) { fileCache = new ucar.nc2.util.cache.FileCache("NetcdfFileCache ", minElementsInMemory, maxElementsInMemory, hardLimit, period); defaultNetcdfFileFactory = new MyNetcdfFileFactory(); }
/** * Enable file caching. call this before calling acquireFile(). * When application terminates, call NetcdfDataset.shutdown(). * * @param minElementsInMemory keep this number in the cache * @param maxElementsInMemory trigger a cleanup if it goes over this number. * @param hardLimit if > 0, never allow more than this many elements. This causes a cleanup to be done in the calling thread. * @param period (secs) do periodic cleanups every this number of seconds. */ static public void initNetcdfFileCache(int minElementsInMemory, int maxElementsInMemory, int hardLimit, int period) { fileCache = new ucar.nc2.util.cache.FileCache("NetcdfFileCache ", minElementsInMemory, maxElementsInMemory, hardLimit, period); defaultNetcdfFileFactory = new MyNetcdfFileFactory(); }
/** * Enable file caching. call this before calling acquireFile(). * When application terminates, call NetcdfDataset.shutdown(). * * @param minElementsInMemory keep this number in the cache * @param maxElementsInMemory trigger a cleanup if it goes over this number. * @param period (secs) do periodic cleanups every this number of seconds. set to < 0 to not cleanup */ static public void initNetcdfFileCache(int minElementsInMemory, int maxElementsInMemory, int period) { fileCache = new ucar.nc2.util.cache.FileCache("NetcdfFileCache ", minElementsInMemory, maxElementsInMemory, -1, period); defaultNetcdfFileFactory = new MyNetcdfFileFactory(); }
/** * Enable file caching. call this before calling acquireFile(). * When application terminates, call NetcdfDataset.shutdown(). * * @param minElementsInMemory keep this number in the cache * @param maxElementsInMemory trigger a cleanup if it goes over this number. * @param period (secs) do periodic cleanups every this number of seconds. */ static public void initNetcdfFileCache(int minElementsInMemory, int maxElementsInMemory, int period) { fileCache = new ucar.nc2.util.cache.FileCache("NetcdfFileCache ", minElementsInMemory, maxElementsInMemory, -1, period); defaultNetcdfFileFactory = new MyNetcdfFileFactory(); }