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 |
| Constructor and Description |
|---|
GribCdmIndex(org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
static GribCollectionImmutable |
acquireGribCollection(ucar.nc2.util.cache.FileFactory factory,
java.lang.Object hashKey,
java.lang.String location,
int buffer_size,
ucar.nc2.util.CancelTask cancelTask,
java.lang.Object spiObject) |
static void |
disableGribCollectionCache() |
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 void |
main2(java.lang.String[] args) |
static void |
main3(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 |
openCdmIndex(java.lang.String indexFilename,
thredds.featurecollection.FeatureCollectionConfig config,
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(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 void initDefaultCollectionCache(int minElementsInMemory,
int maxElementsInMemory,
int period)
public static void disableGribCollectionCache()
public static void setGribCollectionCache(ucar.nc2.util.cache.FileCacheIF cache)
public static GribCollectionImmutable acquireGribCollection(ucar.nc2.util.cache.FileFactory factory, java.lang.Object hashKey, java.lang.String location, int buffer_size, ucar.nc2.util.CancelTask cancelTask, java.lang.Object spiObject) throws java.io.IOException
java.io.IOExceptionpublic static void shutdown()
public static GribCdmIndex.GribCollectionType getType(ucar.unidata.io.RandomAccessFile raf) throws java.io.IOException
raf - open RAFjava.io.IOException - on read errorpublic static GribCollectionImmutable openCdmIndex(java.lang.String indexFilename, thredds.featurecollection.FeatureCollectionConfig config, org.slf4j.Logger logger)
public static GribCollectionImmutable openCdmIndex(java.lang.String indexFilename, thredds.featurecollection.FeatureCollectionConfig config, boolean useCache, org.slf4j.Logger logger)
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 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.IOExceptionpublic 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.IOExceptionpublic 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 main2(java.lang.String[] args)
throws java.io.IOException
java.io.IOExceptionpublic static void main3(java.lang.String[] args)
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception