Class GribCollectionImmutable

  • All Implemented Interfaces:
    Closeable, AutoCloseable, ucar.nc2.util.cache.FileCacheable
    Direct Known Subclasses:
    Grib1Collection, Grib2Collection, PartitionCollectionImmutable

    @Immutable
    public abstract class GribCollectionImmutable
    extends Object
    implements Closeable, ucar.nc2.util.cache.FileCacheable
    An Immutable GribCollection, corresponds to one index (ncx) file. The index file has already been read; it is opened and the closed when a variable is first accessed to read in the record array (sa).

    Could use the Proto equivalents, and eliminate GribCollectionMutable ?

    Since:
    11/10/2014
    • Field Detail

      • countGC

        public static int countGC
      • name

        protected final String name
      • directory

        protected final File directory
      • config

        protected final thredds.featurecollection.FeatureCollectionConfig config
      • isGrib1

        public final boolean isGrib1
      • info

        protected final ucar.nc2.grib.collection.GribCollectionImmutable.Info info
      • dateRange

        protected final ucar.nc2.time.CalendarDateRange dateRange
      • fileMap

        protected final Map<Integer,​thredds.inventory.MFile> fileMap
      • indexFilename

        protected final String indexFilename
    • Method Detail

      • getName

        public String getName()
      • getDirectory

        public File getDirectory()
      • getMasterFirstDate

        public ucar.nc2.time.CalendarDate getMasterFirstDate()
      • getVersion

        public int getVersion()
      • getCenter

        public int getCenter()
      • getSubcenter

        public int getSubcenter()
      • getMaster

        public int getMaster()
      • getLocal

        public int getLocal()
      • getGenProcessType

        public int getGenProcessType()
      • getGenProcessId

        public int getGenProcessId()
      • getBackProcessId

        public int getBackProcessId()
      • getGlobalAttributes

        public ucar.nc2.AttributeContainer getGlobalAttributes()
      • addGlobalAttributes

        public abstract void addGlobalAttributes​(ucar.nc2.AttributeContainer result)
      • release

        @Deprecated
        public void release()
        Deprecated.
        do not use.
        release any resources like file handles.
        Specified by:
        release in interface ucar.nc2.util.cache.FileCacheable
      • reacquire

        @Deprecated
        public void reacquire()
        Deprecated.
        do not use.
        reacquire any resources like file handles.
        Specified by:
        reacquire in interface ucar.nc2.util.cache.FileCacheable
      • getLocation

        public String getLocation()
        Specified by:
        getLocation in interface ucar.nc2.util.cache.FileCacheable
      • getLastModified

        public long getLastModified()
        Specified by:
        getLastModified in interface ucar.nc2.util.cache.FileCacheable
      • setFileCache

        @Deprecated
        public void setFileCache​(ucar.nc2.util.cache.FileCacheIF fileCache)
        Deprecated.
        do not use
        Specified by:
        setFileCache in interface ucar.nc2.util.cache.FileCacheable
      • showStatus

        public void showStatus​(Formatter f)
      • showStatusSummary

        public void showStatusSummary​(Formatter f,
                                      String type)
      • showIndex

        public void showIndex​(Formatter f)
      • getIndexFileSize

        public long getIndexFileSize()
      • getFile

        public thredds.inventory.MFile getFile​(int fileno)
      • getFilename

        public String getFilename​(int fileno)
      • getFiles

        public Collection<thredds.inventory.MFile> getFiles()
      • findMFileByName

        @Nullable
        public thredds.inventory.MFile findMFileByName​(String filename)
      • buildNetcdfDataset

        protected static ucar.nc2.dataset.NetcdfDataset buildNetcdfDataset​(ucar.nc2.iosp.AbstractIOServiceProvider iosp,
                                                                           String location)
                                                                    throws IOException
        Throws:
        IOException