grib/src/main/java/ucar/nc2/grib/collection/GribCdmIndex.java
static GribCollectionImmutable acquireGribCollection(FileFactory factory, Object hashKey,
      String location, int buffer_size, CancelTask cancelTask, Object spiObject) throws IOException {
    FileCacheable result;
    DatasetUrl durl = new DatasetUrl(null, location);

    if (gribCollectionCache != null) {
      // FileFactory factory, Object hashKey, String location, int buffer_size, CancelTask cancelTask, Object spiObject
      result = GribCdmIndex.gribCollectionCache.acquire(factory, hashKey, durl, buffer_size, cancelTask, spiObject);

    } else {
      // String location, int buffer_size, ucar.nc2.util.CancelTask cancelTask, Object iospMessage
      result = factory.open(durl, buffer_size, cancelTask, spiObject);
    }

    return (GribCollectionImmutable) result;
  }
static GribCollectionImmutable acquireGribCollection(FileFactory factory, Object hashKey,
      String location, int buffer_size, CancelTask cancelTask, Object spiObject) throws IOException {
    FileCacheable result;
    DatasetUrl durl = new DatasetUrl(null, location);

    if (gribCollectionCache != null) {
      // FileFactory factory, Object hashKey, String location, int buffer_size, CancelTask cancelTask, Object spiObject
      result = GribCdmIndex.gribCollectionCache.acquire(factory, hashKey, durl, buffer_size, cancelTask, spiObject);

    } else {
      // String location, int buffer_size, ucar.nc2.util.CancelTask cancelTask, Object iospMessage
      result = factory.open(durl, buffer_size, cancelTask, spiObject);
    }

    return (GribCollectionImmutable) result;
  }
open GribCollectionImmutable from an existing index file. return null on failure