tdm/src/main/java/thredds/tdm/GCsummary.java
boolean init() {
    System.setProperty("tds.log.dir", contentTdmDir.toString());

    if (!Files.exists(threddsConfig)) {
      log.error("config file {} does not exist, set -Dtds.content.root.path=<dir>", threddsConfig);
      System.out.printf("threddsConfig does not exist=%s%n", threddsConfig);
      return false;
    }
    ThreddsConfigReader reader = new ThreddsConfigReader(threddsConfig.toString(), log);

    for (String location : reader.getRootList("catalogRoot")) {
      Resource r = new FileSystemResource(contentThreddsDir.toString() + "/" + location);
      catalogRoots.add(r);
    }

    // LOOK check TdsInit
     /* 4.3.15: grib index file placement, using DiskCache2  */
    String gribIndexDir = reader.get("GribIndex.dir", new File(contentThreddsDir.toString(), "cache/grib/").getPath());
    Boolean gribIndexAlwaysUse = reader.getBoolean("GribIndex.alwaysUse", false);
    Boolean gribIndexNeverUse = reader.getBoolean("GribIndex.neverUse", false);
    String gribIndexPolicy = reader.get("GribIndex.policy", null);
    DiskCache2 gribCache = gribIndexNeverUse ? DiskCache2.getNoop() : new DiskCache2(gribIndexDir, false, -1, -1);
    gribCache.setPolicy(gribIndexPolicy);
    gribCache.setAlwaysUseCache(gribIndexAlwaysUse);
    gribCache.setNeverUseCache(gribIndexNeverUse);
    GribIndexCache.setDiskCache2(gribCache);
    log.info("TDM set " + gribCache);

    return true;
  }
boolean init() {
    System.setProperty("tds.log.dir", contentTdmDir.toString());

    if (!Files.exists(threddsConfig)) {
      log.error("config file {} does not exist, set -Dtds.content.root.path=<dir>", threddsConfig);
      System.out.printf("threddsConfig does not exist=%s%n", threddsConfig);
      return false;
    }
    ThreddsConfigReader reader = new ThreddsConfigReader(threddsConfig.toString(), log);

    for (String location : reader.getRootList("catalogRoot")) {
      Resource r = new FileSystemResource(contentThreddsDir.toString() + "/" + location);
      catalogRoots.add(r);
    }

    // LOOK check TdsInit
     /* 4.3.15: grib index file placement, using DiskCache2  */
    String gribIndexDir = reader.get("GribIndex.dir", new File(contentThreddsDir.toString(), "cache/grib/").getPath());
    Boolean gribIndexAlwaysUse = reader.getBoolean("GribIndex.alwaysUse", false);
    Boolean gribIndexNeverUse = reader.getBoolean("GribIndex.neverUse", false);
    String gribIndexPolicy = reader.get("GribIndex.policy", null);
    DiskCache2 gribCache = gribIndexNeverUse ? DiskCache2.getNoop() : new DiskCache2(gribIndexDir, false, -1, -1);
    gribCache.setPolicy(gribIndexPolicy);
    gribCache.setAlwaysUseCache(gribIndexAlwaysUse);
    gribCache.setNeverUseCache(gribIndexNeverUse);
    GribIndexCache.setDiskCache2(gribCache);
    log.info("TDM set " + gribCache);

    return true;
  }
boolean init ( ) { System . setProperty ( "tds.log.dir" , contentTdmDir . toString ( ) ) ; if ( ! Files . exists ( threddsConfig ) ) { log . error ( "config file {} does not exist, set -Dtds.content.root.path=<dir>" , threddsConfig ) ; System . out . printf ( "threddsConfig does not exist=%s%n" , threddsConfig ) ; return false ; } ThreddsConfigReader reader = new ThreddsConfigReader ( threddsConfig . toString ( ) , log ) ; for ( String location : reader . getRootList ( "catalogRoot" ) ) { Resource r = new FileSystemResource ( contentThreddsDir . toString ( ) + "/" + location ) ; catalogRoots . add ( r ) ; } // LOOK check TdsInit /* 4.3.15: grib index file placement, using DiskCache2  */ String gribIndexDir = reader . get ( "GribIndex.dir" , new File ( contentThreddsDir . toString ( ) , "cache/grib/" ) . getPath ( ) ) ; Boolean gribIndexAlwaysUse = reader . getBoolean ( "GribIndex.alwaysUse" , false ) ; Boolean gribIndexNeverUse = reader . getBoolean ( "GribIndex.neverUse" , false ) ; String gribIndexPolicy = reader . get ( "GribIndex.policy" , null ) ; DiskCache2 gribCache = gribIndexNeverUse ? DiskCache2 . getNoop ( ) : new DiskCache2 ( gribIndexDir , false , - 1 , - 1 ) ; gribCache . setPolicy ( gribIndexPolicy ) ; gribCache . setAlwaysUseCache ( gribIndexAlwaysUse ) ; gribCache . setNeverUseCache ( gribIndexNeverUse ) ; GribIndexCache . setDiskCache2 ( gribCache ) ; log . info ( "TDM set " + gribCache ) ; return true ; }
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////