public class GribCdmIndex
extends java.lang.Object
implements thredds.inventory.partition.IndexReader
| Modifier and Type | Class and Description |
|---|---|
static class |
GribCdmIndex.GribCollectionType |
| Modifier and Type | Field and Description |
|---|---|
static ucar.nc2.util.cache.FileCacheIF |
gribCollectionCache |
static java.lang.String |
NCX_SUFFIX |
| Constructor and Description |
|---|
GribCdmIndex(org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
static void |
disableGribCollectionCache() |
static java.io.File |
getTopIndexFileFromConfig(thredds.featurecollection.FeatureCollectionConfig config) |
static GribCdmIndex.GribCollectionType |
getType(ucar.unidata.io.RandomAccessFile raf)
Find out what kind of index this is
|
static void |
initDefaultCollectionCache(int minElementsInMemory,
int maxElementsInMemory,
int period) |
boolean |
isPartition(java.nio.file.Path indexFile) |
static void |
main(java.lang.String[] args) |
static boolean |
makeIndex(thredds.featurecollection.FeatureCollectionConfig config,
java.util.Formatter errlog,
java.nio.file.Path topPath) |
static boolean |
moveCdmIndex(java.lang.String indexFilename,
org.slf4j.Logger logger) |
static GribCollectionImmutable |
openCdmIndex(java.lang.String indexFilename,
thredds.featurecollection.FeatureCollectionConfig config,
boolean useCache,
org.slf4j.Logger logger) |
static GribCollectionImmutable |
openGribCollection(thredds.featurecollection.FeatureCollectionConfig config,
thredds.inventory.CollectionUpdateType updateType,
org.slf4j.Logger logger)
Open GribCollection from config.
|
static GribCollectionImmutable |
openGribCollectionFromDataFile(boolean isGrib1,
thredds.inventory.MFile mfile,
thredds.inventory.CollectionUpdateType updateType,
thredds.featurecollection.FeatureCollectionConfig config,
java.util.Formatter errlog,
org.slf4j.Logger logger) |
static GribCollectionImmutable |
openGribCollectionFromIndexFile(ucar.unidata.io.RandomAccessFile indexRaf,
thredds.featurecollection.FeatureCollectionConfig config,
org.slf4j.Logger logger)
Create a grib collection / partition collection from an existing ncx2 file.
|
static GribCollectionImmutable |
openGribCollectionFromRaf(ucar.unidata.io.RandomAccessFile raf,
thredds.featurecollection.FeatureCollectionConfig config,
thredds.inventory.CollectionUpdateType updateType,
org.slf4j.Logger logger) |
static GribCollectionMutable |
openMutableGCFromIndex(java.lang.String indexFilename,
thredds.featurecollection.FeatureCollectionConfig config,
boolean dataOnly,
boolean useCache,
org.slf4j.Logger logger) |
boolean |
readChildren(java.nio.file.Path indexFile,
thredds.inventory.partition.IndexReader.AddChildCallback callback) |
boolean |
readMFiles(java.nio.file.Path indexFile,
java.util.List<thredds.inventory.MFile> result) |
static void |
setGribCollectionCache(ucar.nc2.util.cache.FileCacheIF cache) |
static void |
shutdown() |
static boolean |
updateGribCollection(boolean isGrib1,
thredds.inventory.MCollection dcm,
thredds.inventory.CollectionUpdateType updateType,
thredds.featurecollection.FeatureCollectionConfig.PartitionType ptype,
org.slf4j.Logger logger,
java.util.Formatter errlog) |
static boolean |
updateGribCollection(thredds.featurecollection.FeatureCollectionConfig config,
thredds.inventory.CollectionUpdateType updateType,
org.slf4j.Logger logger)
Update Grib Collection if needed
|
static boolean |
updateGribCollectionFromPCollection(boolean isGrib1,
thredds.inventory.partition.PartitionManager dcm,
thredds.inventory.CollectionUpdateType updateType,
java.util.Formatter errlog,
org.slf4j.Logger logger) |
public static final java.lang.String NCX_SUFFIX
public static ucar.nc2.util.cache.FileCacheIF gribCollectionCache
public static void initDefaultCollectionCache(int minElementsInMemory,
int maxElementsInMemory,
int period)
public static void disableGribCollectionCache()
public static void setGribCollectionCache(ucar.nc2.util.cache.FileCacheIF cache)
public static void shutdown()
public static java.io.File getTopIndexFileFromConfig(thredds.featurecollection.FeatureCollectionConfig config)
public static GribCdmIndex.GribCollectionType getType(ucar.unidata.io.RandomAccessFile raf) throws java.io.IOException
raf - open RAFjava.io.IOException - on read error@Nullable public static GribCollectionImmutable openCdmIndex(java.lang.String indexFilename, thredds.featurecollection.FeatureCollectionConfig config, boolean useCache, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException@Nullable public static GribCollectionMutable openMutableGCFromIndex(java.lang.String indexFilename, thredds.featurecollection.FeatureCollectionConfig config, boolean dataOnly, boolean useCache, org.slf4j.Logger logger)
public static boolean updateGribCollectionFromPCollection(boolean isGrib1,
thredds.inventory.partition.PartitionManager dcm,
thredds.inventory.CollectionUpdateType updateType,
java.util.Formatter errlog,
org.slf4j.Logger logger)
throws java.io.IOException
java.io.IOExceptionpublic static boolean updateGribCollection(thredds.featurecollection.FeatureCollectionConfig config,
thredds.inventory.CollectionUpdateType updateType,
org.slf4j.Logger logger)
throws java.io.IOException
java.io.IOExceptionpublic static boolean updateGribCollection(boolean isGrib1,
thredds.inventory.MCollection dcm,
thredds.inventory.CollectionUpdateType updateType,
thredds.featurecollection.FeatureCollectionConfig.PartitionType ptype,
org.slf4j.Logger logger,
java.util.Formatter errlog)
throws java.io.IOException
java.io.IOExceptionpublic static boolean makeIndex(thredds.featurecollection.FeatureCollectionConfig config,
java.util.Formatter errlog,
java.nio.file.Path topPath)
throws java.io.IOException
java.io.IOExceptionpublic static boolean moveCdmIndex(java.lang.String indexFilename,
org.slf4j.Logger logger)
throws java.io.IOException
java.io.IOExceptionpublic static GribCollectionImmutable openGribCollection(thredds.featurecollection.FeatureCollectionConfig config, thredds.inventory.CollectionUpdateType updateType, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOExceptionpublic static GribCollectionImmutable openGribCollectionFromRaf(ucar.unidata.io.RandomAccessFile raf, thredds.featurecollection.FeatureCollectionConfig config, thredds.inventory.CollectionUpdateType updateType, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException@Nullable public static GribCollectionImmutable openGribCollectionFromDataFile(boolean isGrib1, thredds.inventory.MFile mfile, thredds.inventory.CollectionUpdateType updateType, thredds.featurecollection.FeatureCollectionConfig config, java.util.Formatter errlog, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException@Nullable public static GribCollectionImmutable openGribCollectionFromIndexFile(ucar.unidata.io.RandomAccessFile indexRaf, thredds.featurecollection.FeatureCollectionConfig config, org.slf4j.Logger logger) throws java.io.IOException
indexRaf - the ncx2 file already openconfig - special configurationjava.io.IOException - on io errorpublic boolean readChildren(java.nio.file.Path indexFile,
thredds.inventory.partition.IndexReader.AddChildCallback callback)
throws java.io.IOException
readChildren in interface thredds.inventory.partition.IndexReaderjava.io.IOExceptionpublic boolean isPartition(java.nio.file.Path indexFile)
throws java.io.IOException
isPartition in interface thredds.inventory.partition.IndexReaderjava.io.IOExceptionpublic boolean readMFiles(java.nio.file.Path indexFile,
java.util.List<thredds.inventory.MFile> result)
throws java.io.IOException
readMFiles in interface thredds.inventory.partition.IndexReaderjava.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception