Examples of DiskCache2


Examples of ucar.nc2.util.DiskCache2

    * Create a ForecastModelRun Collection from the datasets in a catalog.
    * @param catURL  scan this catalog
    * @throws Exception on bad
    */
  public static FmrcInventory makeFromCatalog(String catURL, String collectionName, int maxDatasets, int mode) throws Exception {
    DiskCache2 cache =  new DiskCache2("fmrcInventory/", true, 0, -1); // dont scour - messes up the TDS!

    return makeFromCatalog(cache, catURL, collectionName, maxDatasets,  mode);
  }
View Full Code Here

Examples of ucar.nc2.util.DiskCache2

  public TestAggExistingCached( String name) {
    super(name);
  }

  public void setUp() {
    Aggregation.setPersistenceCache( new DiskCache2("/.unidata/cachePersist", true, 60 * 24 * 30, 60));
  }
View Full Code Here

Examples of ucar.nc2.util.DiskCache2

    if (args.length == 1) {
      ForecastModelRunInventory.open(null, args[0], ForecastModelRunInventory.OPEN_FORCE_NEW, true);
      ForecastModelRunInventory.readXML( args[0] +".fmrInv.xml" );
      return;
    }
    DiskCache2 cache =  new DiskCache2("fmrcInventory/", true, 5 * 24 * 3600, 3600);
    String url = "http://motherlode.ucar.edu:9080/thredds/dodsC/fmrc/NCEP/NAM/CONUS_12km/files/NAM_CONUS_12km_20070419_1800.grib2";
    ForecastModelRunInventory fmr = ForecastModelRunInventory.open(cache, url, ForecastModelRunInventory.OPEN_NORMAL, false);
    fmr.writeXML(System.out);
  }
View Full Code Here

Examples of ucar.nc2.util.DiskCache2

  String dataDir = "//zero/share/testdata/image/testSync/";

  public void testTiming() throws IOException, InterruptedException {
    String filename = "file:C:/TEMP/aggManyFiles/TestAggManyFiles.ncml";
    Aggregation.setPersistenceCache( new DiskCache2("/.unidata/cachePersist", true, 60 * 24 * 30, 60));

    long start = System.currentTimeMillis();
    NetcdfFile ncfile = NcMLReader.readNcML(filename, null);
    long ending = System.currentTimeMillis();
    double secs = .001 * (ending - start);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.