Class GridInventoryCacheChronicle

  • All Implemented Interfaces:
    ucar.nc2.internal.dataset.ft.fmrc.InventoryCacheProvider

    public class GridInventoryCacheChronicle
    extends Object
    implements ucar.nc2.internal.dataset.ft.fmrc.InventoryCacheProvider
    Implementation of a persisted grid inventory cache using ChronicleMap.
    • Constructor Detail

      • GridInventoryCacheChronicle

        public GridInventoryCacheChronicle()
    • Method Detail

      • init

        public static void init​(Path cacheDir)
                         throws IOException
        Initialize the inventory cache
        Parameters:
        cacheDir - Path to the cache directory. This location will be created if it does not exist.
        Throws:
        IOException
      • get

        @Nullable
        public ucar.nc2.ft.fmrc.GridDatasetInv get​(thredds.inventory.MFile mfile)
                                            throws IOException
        Specified by:
        get in interface ucar.nc2.internal.dataset.ft.fmrc.InventoryCacheProvider
        Throws:
        IOException
      • put

        public void put​(thredds.inventory.MFile mfile,
                        ucar.nc2.ft.fmrc.GridDatasetInv inventory)
                 throws IOException
        Specified by:
        put in interface ucar.nc2.internal.dataset.ft.fmrc.InventoryCacheProvider
        Throws:
        IOException
      • shutdown

        public static void shutdown()
        Shutdown hook to close the cache.