public class GribCdmIndex extends java.lang.Object implements IndexReader
Modifier and Type | Class and Description |
---|---|
static class |
GribCdmIndex.GribCollectionType |
IndexReader.AddChildCallback
Modifier and Type | Field and Description |
---|---|
static FileCacheIF |
gribCollectionCache |
Constructor and Description |
---|
GribCdmIndex(org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
static GribCollectionImmutable |
acquireGribCollection(FileFactory factory,
java.lang.Object hashKey,
java.lang.String location,
int buffer_size,
CancelTask cancelTask,
java.lang.Object spiObject) |
static void |
disableGribCollectionCache() |
static GribCdmIndex.GribCollectionType |
getType(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)
Open an ncx file and find out what type it is
|
static void |
main(java.lang.String[] args) |
static void |
main2(java.lang.String[] args) |
static void |
main3(java.lang.String[] args) |
static boolean |
makeIndex(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,
FeatureCollectionConfig config,
boolean useCache,
org.slf4j.Logger logger) |
static GribCollectionImmutable |
openCdmIndex(java.lang.String indexFilename,
FeatureCollectionConfig config,
org.slf4j.Logger logger) |
static GribCollectionImmutable |
openGribCollection(FeatureCollectionConfig config,
CollectionUpdateType updateType,
org.slf4j.Logger logger)
Open GribCollection from config.
|
static GribCollectionImmutable |
openGribCollectionFromDataFile(boolean isGrib1,
MFile mfile,
CollectionUpdateType updateType,
FeatureCollectionConfig config,
java.util.Formatter errlog,
org.slf4j.Logger logger) |
static GribCollectionImmutable |
openGribCollectionFromIndexFile(RandomAccessFile indexRaf,
FeatureCollectionConfig config,
org.slf4j.Logger logger)
Create a grib collection / partition collection from an existing ncx2 file.
|
static GribCollectionImmutable |
openGribCollectionFromRaf(RandomAccessFile raf,
FeatureCollectionConfig config,
CollectionUpdateType updateType,
org.slf4j.Logger logger) |
static GribCollectionMutable |
openMutableGCFromIndex(java.lang.String indexFilename,
FeatureCollectionConfig config,
boolean dataOnly,
boolean useCache,
org.slf4j.Logger logger) |
boolean |
readChildren(java.nio.file.Path indexFile,
IndexReader.AddChildCallback callback)
Open a Partition ncx file and read children indexes
|
boolean |
readMFiles(java.nio.file.Path indexFile,
java.util.List<MFile> result)
Read the MFiles from a GribCollection index file
|
static void |
setGribCollectionCache(FileCacheIF cache) |
static void |
shutdown() |
static boolean |
updateGribCollection(FeatureCollectionConfig config,
CollectionUpdateType updateType,
org.slf4j.Logger logger)
update Grib Collection if needed
|
static boolean |
updateGribCollectionFromPCollection(boolean isGrib1,
PartitionManager dcm,
CollectionUpdateType updateType,
java.util.Formatter errlog,
org.slf4j.Logger logger) |
public static FileCacheIF gribCollectionCache
public static void initDefaultCollectionCache(int minElementsInMemory, int maxElementsInMemory, int period)
public static void disableGribCollectionCache()
public static void setGribCollectionCache(FileCacheIF cache)
public static GribCollectionImmutable acquireGribCollection(FileFactory factory, java.lang.Object hashKey, java.lang.String location, int buffer_size, CancelTask cancelTask, java.lang.Object spiObject) throws java.io.IOException
java.io.IOException
public static void shutdown()
public static GribCdmIndex.GribCollectionType getType(RandomAccessFile raf) throws java.io.IOException
raf
- open RAFjava.io.IOException
- on read errorpublic static GribCollectionImmutable openCdmIndex(java.lang.String indexFilename, FeatureCollectionConfig config, org.slf4j.Logger logger)
public static GribCollectionImmutable openCdmIndex(java.lang.String indexFilename, FeatureCollectionConfig config, boolean useCache, org.slf4j.Logger logger)
public static GribCollectionMutable openMutableGCFromIndex(java.lang.String indexFilename, FeatureCollectionConfig config, boolean dataOnly, boolean useCache, org.slf4j.Logger logger)
public static boolean updateGribCollectionFromPCollection(boolean isGrib1, PartitionManager dcm, CollectionUpdateType updateType, java.util.Formatter errlog, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException
public static boolean updateGribCollection(FeatureCollectionConfig config, CollectionUpdateType updateType, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException
public static boolean makeIndex(FeatureCollectionConfig config, java.util.Formatter errlog, java.nio.file.Path topPath) throws java.io.IOException
java.io.IOException
public static boolean moveCdmIndex(java.lang.String indexFilename, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException
public static GribCollectionImmutable openGribCollection(FeatureCollectionConfig config, CollectionUpdateType updateType, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException
public static GribCollectionImmutable openGribCollectionFromRaf(RandomAccessFile raf, FeatureCollectionConfig config, CollectionUpdateType updateType, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException
public static GribCollectionImmutable openGribCollectionFromDataFile(boolean isGrib1, MFile mfile, CollectionUpdateType updateType, FeatureCollectionConfig config, java.util.Formatter errlog, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException
public static GribCollectionImmutable openGribCollectionFromIndexFile(RandomAccessFile indexRaf, 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, IndexReader.AddChildCallback callback) throws java.io.IOException
IndexReader
readChildren
in interface IndexReader
indexFile
- the Partition ncx index file to opencallback
- for each child index, call this backjava.io.IOException
- on bad thingspublic boolean isPartition(java.nio.file.Path indexFile) throws java.io.IOException
IndexReader
isPartition
in interface IndexReader
indexFile
- the ncx index file to openjava.io.IOException
- on badpublic boolean readMFiles(java.nio.file.Path indexFile, java.util.List<MFile> result) throws java.io.IOException
IndexReader
readMFiles
in interface IndexReader
indexFile
- the Partition ncx index file to openresult
- put results in this listjava.io.IOException
public static void main2(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public static void main3(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception