@Immutable public abstract class GribCollectionImmutable extends java.lang.Object implements java.io.Closeable, FileCacheable
Modifier and Type | Class and Description |
---|---|
class |
GribCollectionImmutable.Dataset |
class |
GribCollectionImmutable.GroupGC |
static class |
GribCollectionImmutable.Info |
static class |
GribCollectionImmutable.Record |
static class |
GribCollectionImmutable.Type |
class |
GribCollectionImmutable.VariableIndex |
Modifier and Type | Field and Description |
---|---|
protected FeatureCollectionConfig |
config |
static int |
countGC |
protected GribTables |
cust |
protected java.util.List<GribCollectionImmutable.Dataset> |
datasets |
protected java.io.File |
directory |
protected java.util.Map<java.lang.Integer,MFile> |
fileMap |
protected java.util.List<GribHorizCoordSystem> |
horizCS |
protected java.lang.String |
indexFilename |
protected GribCollectionImmutable.Info |
info |
boolean |
isGrib1 |
protected CoordinateRuntime |
masterRuntime |
protected java.lang.String |
name |
protected FileCacheIF |
objCache |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addGlobalAttributes(java.util.List<Attribute> result) |
void |
close()
Close the FileCacheable, release all resources.
|
MFile |
findMFileByName(java.lang.String filename) |
int |
getBackProcessId() |
int |
getCenter() |
RandomAccessFile |
getDataRaf(int fileno) |
GribCollectionImmutable.Dataset |
getDataset(int idx) |
GribCollectionImmutable.Dataset |
getDatasetByTypeName(java.lang.String name) |
GribCollectionImmutable.Dataset |
getDatasetCanonical() |
java.util.List<GribCollectionImmutable.Dataset> |
getDatasets() |
java.io.File |
getDirectory() |
java.lang.String |
getFilename(int fileno) |
java.util.Collection<MFile> |
getFiles() |
java.lang.String |
getFirstFilename() |
int |
getGenProcessId() |
int |
getGenProcessType() |
java.util.List<Attribute> |
getGlobalAttributes() |
abstract GridDataset |
getGridDataset(GribCollectionImmutable.Dataset ds,
GribCollectionImmutable.GroupGC group,
java.lang.String filename,
FeatureCollectionConfig gribConfig,
java.util.Formatter errlog,
org.slf4j.Logger logger) |
long |
getIndexFileSize() |
long |
getLastModified()
Returns the time that the underlying file(s) were last modified.
|
int |
getLocal() |
java.lang.String |
getLocation()
The location of the FileCacheable.
|
int |
getMaster() |
CoordinateRuntime |
getMasterRuntime() |
java.lang.String |
getName() |
abstract NetcdfDataset |
getNetcdfDataset(GribCollectionImmutable.Dataset ds,
GribCollectionImmutable.GroupGC group,
java.lang.String filename,
FeatureCollectionConfig gribConfig,
java.util.Formatter errlog,
org.slf4j.Logger logger) |
int |
getSubcenter() |
int |
getVersion() |
protected GribCollectionImmutable.VariableIndex |
makeVariableIndex(GribCollectionImmutable.GroupGC group,
GribCollectionMutable.VariableIndex mutableVar) |
void |
reacquire() |
void |
release() |
void |
setFileCache(FileCacheIF fileCache)
If the FileCache is not null, FileCacheable.close() must call FileCache.release()
|
void |
showIndex(java.util.Formatter f) |
void |
showIndexFile(java.util.Formatter f) |
void |
showStatus(java.util.Formatter f) |
void |
showStatusSummary(java.util.Formatter f,
java.lang.String type) |
java.lang.String |
toString() |
public static int countGC
protected final java.lang.String name
protected final java.io.File directory
protected final FeatureCollectionConfig config
public final boolean isGrib1
protected final GribCollectionImmutable.Info info
protected final java.util.List<GribCollectionImmutable.Dataset> datasets
protected final java.util.List<GribHorizCoordSystem> horizCS
protected final CoordinateRuntime masterRuntime
protected final java.util.Map<java.lang.Integer,MFile> fileMap
protected final GribTables cust
protected final java.lang.String indexFilename
protected FileCacheIF objCache
protected GribCollectionImmutable.VariableIndex makeVariableIndex(GribCollectionImmutable.GroupGC group, GribCollectionMutable.VariableIndex mutableVar)
public java.util.List<GribCollectionImmutable.Dataset> getDatasets()
public GribCollectionImmutable.Dataset getDataset(int idx)
public GribCollectionImmutable.Dataset getDatasetByTypeName(java.lang.String name)
public GribCollectionImmutable.Dataset getDatasetCanonical()
public java.lang.String getName()
public java.io.File getDirectory()
public CoordinateRuntime getMasterRuntime()
public int getVersion()
public int getCenter()
public int getSubcenter()
public int getMaster()
public int getLocal()
public int getGenProcessType()
public int getGenProcessId()
public int getBackProcessId()
public java.util.List<Attribute> getGlobalAttributes()
protected abstract void addGlobalAttributes(java.util.List<Attribute> result)
public void close() throws java.io.IOException
FileCacheable
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface FileCacheable
java.io.IOException
- on io errorpublic void release() throws java.io.IOException
release
in interface FileCacheable
java.io.IOException
public void reacquire() throws java.io.IOException
reacquire
in interface FileCacheable
java.io.IOException
public java.lang.String getLocation()
FileCacheable
getLocation
in interface FileCacheable
public long getLastModified()
FileCacheable
FileFactory
.getLastModified
in interface FileCacheable
long
value representing the time the file(s) were last modified or 0L
if the
last-modified time couldn't be determined for any reason.public void setFileCache(FileCacheIF fileCache)
FileCacheable
public synchronized void close() throws java.io.IOException { if (cache != null) { if (cache.release(this)) return; } reallyClose(); }
setFileCache
in interface FileCacheable
fileCache
- must store this, use it on close as above.public void showStatus(java.util.Formatter f)
public void showStatusSummary(java.util.Formatter f, java.lang.String type)
public void showIndexFile(java.util.Formatter f)
public void showIndex(java.util.Formatter f)
public java.lang.String toString()
toString
in class java.lang.Object
public long getIndexFileSize()
public java.lang.String getFilename(int fileno)
public java.lang.String getFirstFilename()
public java.util.Collection<MFile> getFiles()
public MFile findMFileByName(java.lang.String filename)
public RandomAccessFile getDataRaf(int fileno) throws java.io.IOException
java.io.IOException
public abstract NetcdfDataset getNetcdfDataset(GribCollectionImmutable.Dataset ds, GribCollectionImmutable.GroupGC group, java.lang.String filename, FeatureCollectionConfig gribConfig, java.util.Formatter errlog, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException
public abstract GridDataset getGridDataset(GribCollectionImmutable.Dataset ds, GribCollectionImmutable.GroupGC group, java.lang.String filename, FeatureCollectionConfig gribConfig, java.util.Formatter errlog, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException