Package thredds.featurecollection.cache
Class GridInventoryCacheChronicle
- java.lang.Object
-
- thredds.featurecollection.cache.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 Summary
Constructors Constructor Description GridInventoryCacheChronicle()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ucar.nc2.ft.fmrc.GridDatasetInvget(thredds.inventory.MFile mfile)static voidinit(Path cacheDir)Initialize the inventory cachestatic voidinit(Path cacheDir, int maxEntries, int maxBloatFactor)Initialize the inventory cachevoidput(thredds.inventory.MFile mfile, ucar.nc2.ft.fmrc.GridDatasetInv inventory)static voidshutdown()Shutdown hook to close the cache.
-
-
-
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
-
init
public static void init(Path cacheDir, int maxEntries, int maxBloatFactor) 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 cache, at mostmaxBloatFactor- max number of times the cache size can increase- Throws:
IOException
-
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
-
shutdown
public static void shutdown()
Shutdown hook to close the cache.
-
-