public class GribCdmIndex extends 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,
Object hashKey,
String location,
int buffer_size,
CancelTask cancelTask,
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(Path indexFile)
Open an ncx file and find out what type it is
|
static void |
main(String[] args) |
static void |
main2(String[] args) |
static void |
main3(String[] args) |
static boolean |
makeIndex(FeatureCollectionConfig config,
Formatter errlog,
Path topPath) |
static boolean |
moveCdmIndex(String indexFilename,
org.slf4j.Logger logger) |
static GribCollectionImmutable |
openCdmIndex(String indexFilename,
FeatureCollectionConfig config,
boolean useCache,
org.slf4j.Logger logger) |
static GribCollectionImmutable |
openCdmIndex(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,
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(String indexFilename,
FeatureCollectionConfig config,
boolean dataOnly,
boolean useCache,
org.slf4j.Logger logger) |
boolean |
readChildren(Path indexFile,
IndexReader.AddChildCallback callback)
Open a Partition ncx file and read children indexes
|
boolean |
readMFiles(Path indexFile,
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,
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, Object hashKey, String location, int buffer_size, CancelTask cancelTask, Object spiObject) throws IOException
IOException
public static void shutdown()
public static GribCdmIndex.GribCollectionType getType(RandomAccessFile raf) throws IOException
raf
- open RAFIOException
- on read errorpublic static GribCollectionImmutable openCdmIndex(String indexFilename, FeatureCollectionConfig config, org.slf4j.Logger logger)
public static GribCollectionImmutable openCdmIndex(String indexFilename, FeatureCollectionConfig config, boolean useCache, org.slf4j.Logger logger)
public static GribCollectionMutable openMutableGCFromIndex(String indexFilename, FeatureCollectionConfig config, boolean dataOnly, boolean useCache, org.slf4j.Logger logger)
public static boolean updateGribCollectionFromPCollection(boolean isGrib1, PartitionManager dcm, CollectionUpdateType updateType, Formatter errlog, org.slf4j.Logger logger) throws IOException
IOException
public static boolean updateGribCollection(FeatureCollectionConfig config, CollectionUpdateType updateType, org.slf4j.Logger logger) throws IOException
IOException
public static boolean makeIndex(FeatureCollectionConfig config, Formatter errlog, Path topPath) throws IOException
IOException
public static boolean moveCdmIndex(String indexFilename, org.slf4j.Logger logger) throws IOException
IOException
public static GribCollectionImmutable openGribCollection(FeatureCollectionConfig config, CollectionUpdateType updateType, org.slf4j.Logger logger) throws IOException
IOException
public static GribCollectionImmutable openGribCollectionFromRaf(RandomAccessFile raf, FeatureCollectionConfig config, CollectionUpdateType updateType, org.slf4j.Logger logger) throws IOException
IOException
public static GribCollectionImmutable openGribCollectionFromDataFile(boolean isGrib1, MFile mfile, CollectionUpdateType updateType, FeatureCollectionConfig config, Formatter errlog, org.slf4j.Logger logger) throws IOException
IOException
public static GribCollectionImmutable openGribCollectionFromIndexFile(RandomAccessFile indexRaf, FeatureCollectionConfig config, org.slf4j.Logger logger) throws IOException
indexRaf
- the ncx2 file already openconfig
- special configurationIOException
- on io errorpublic boolean readChildren(Path indexFile, IndexReader.AddChildCallback callback) throws IOException
IndexReader
readChildren
in interface IndexReader
indexFile
- the Partition ncx index file to opencallback
- for each child index, call this backIOException
- on bad thingspublic boolean isPartition(Path indexFile) throws IOException
IndexReader
isPartition
in interface IndexReader
indexFile
- the ncx index file to openIOException
- on badpublic boolean readMFiles(Path indexFile, List<MFile> result) throws IOException
IndexReader
readMFiles
in interface IndexReader
indexFile
- the Partition ncx index file to openresult
- put results in this listIOException
public static void main2(String[] args) throws IOException
IOException
public static void main3(String[] args) throws IOException
IOException
Copyright © 1999–2018 UCAR/Unidata. All rights reserved.