|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CollectionManager
Manages a dynamic collection of MFile objects. Allows storing key/value pairs on MFiles. An MFile must have the property that
NetcdfDataset.open(MFile.getPath, ...);should work.
Method Summary | |
---|---|
void |
close()
release any resources |
Date |
extractRunDate(MFile mfile)
Use the date extractor to extract the date from the filename |
String |
getCollectionName()
|
List<MFile> |
getFiles()
Get the current collection of MFile, since last scan or rescan. |
long |
getLastChanged()
Get the last time files changed |
long |
getLastScanned()
Get the last time scanned |
byte[] |
getMetadata(MFile file,
String key)
|
TimeUnit |
getRecheck()
Get how often to rescan |
String |
getRoot()
Get common root of all MFiles in the collection - may be null |
boolean |
isRescanNeeded()
Compute if rescan is needed. |
void |
putMetadata(MFile file,
String key,
byte[] value)
|
boolean |
rescan()
Rescan directories. |
void |
resetProto()
|
void |
scan(CancelTask cancelTask)
Scan the directory(ies) and create MFile objects. |
Method Detail |
---|
String getCollectionName()
void scan(CancelTask cancelTask) throws IOException
cancelTask
- allow user to cancel
IOException
- if io errorboolean isRescanNeeded()
boolean rescan() throws IOException
IOException
- on I/O errorvoid resetProto()
TimeUnit getRecheck()
long getLastScanned()
long getLastChanged()
String getRoot()
List<MFile> getFiles()
Date extractRunDate(MFile mfile)
mfile
- extract from here
void close()
void putMetadata(MFile file, String key, byte[] value)
byte[] getMetadata(MFile file, String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |