Package thredds.featurecollection.cache
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionucar.nc2.ft.fmrc.GridDatasetInvget(thredds.inventory.MFile mfile) static voidInitialize the inventory cachestatic voidInitialize the inventory cachestatic Stringname()voidput(thredds.inventory.MFile mfile, ucar.nc2.ft.fmrc.GridDatasetInv inventory) static voidDisplay cache infostatic voidshutdown()Shutdown hook to close the cache.
-
Constructor Details
-
GridInventoryDiskPersistedCache
public GridInventoryDiskPersistedCache()
-
-
Method Details
-
init
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
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
-
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:
getin interfaceucar.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:
putin interfaceucar.nc2.internal.dataset.ft.fmrc.InventoryCacheProvider- Throws:
IOException
-
showCache
Display cache info
-