Class GridInventoryDiskPersistedCache

java.lang.Object
thredds.featurecollection.cache.GridInventoryDiskPersistedCache
All Implemented Interfaces:
ucar.nc2.internal.dataset.ft.fmrc.InventoryCacheProvider

public class GridInventoryDiskPersistedCache extends Object implements ucar.nc2.internal.dataset.ft.fmrc.InventoryCacheProvider
  • Constructor Details

    • GridInventoryDiskPersistedCache

      public GridInventoryDiskPersistedCache()
  • Method Details

    • 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 - error managing cache directory
    • init

      public static void init(Path cacheDir, int maxEntries) throws IOException
      Initialize the inventory cache
      Parameters:
      cacheDir - path to the cache directory. This location will be created if it does not exist.
      maxEntries - number of entries in the in-memory cache, at most
      Throws:
      IOException - error managing cache directory
    • name

      public static String name()
    • shutdown

      public static void shutdown()
      Shutdown hook to close the cache.
    • 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
    • showCache

      public static void showCache(Formatter formatter)
      Display cache info