public class CollectionManagerSingleFile extends CollectionManagerAbstract
CollectionManager.ChangeChecker, CollectionManager.Force, CollectionManager.TriggerEvent, CollectionManager.TriggerListener, CollectionManager.TriggerType
auxInfo, changeChecker, collectionName, logger, protoChoice, recheck
Constructor and Description |
---|
CollectionManagerSingleFile(MFile file,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
CalendarDate |
extractRunDate(MFile mfile)
Use the date extractor to extract the date from the filename.
|
Iterable<MFile> |
getFiles()
Get the current collection of MFile.
|
long |
getLastScanned()
Get the last time scanned
|
String |
getRoot()
Get common root directory of all MFiles in the collection - may be null
|
CalendarDate |
getStartCollection()
The starting date of the collection.
|
boolean |
hasDateExtractor()
Does this CollectionManager have the ability to extract a date from the MFile ?
|
boolean |
isScanNeeded()
Compute whether rescan is needed, based on getRecheck(), and the LastScanned value.
|
boolean |
scan(boolean sendEvent)
Scan the collection.
|
boolean |
scanIfNeeded()
If isScanNeeded(), do a scan.
|
void |
setFiles(Iterable<MFile> files)
dcm must be updated when index is read in
|
addEventListener, cleanName, close, createListenerManager, deleteOld, enableMetadataManager, getAuxInfo, getCollectionName, getFilenames, getLatestFile, getMetadata, getOlderThanFilterInMSecs, getProtoIndex, getRecheck, isStatic, putAuxInfo, putMetadata, removeEventListener, resetProto, setChangeChecker, setStatic, updateNocheck
public CollectionManagerSingleFile(MFile file, org.slf4j.Logger logger)
public String getRoot()
CollectionManager
public long getLastScanned()
CollectionManager
public boolean isScanNeeded()
CollectionManager
public boolean scanIfNeeded() throws IOException
CollectionManager
IOException
- on io errorpublic boolean scan(boolean sendEvent) throws IOException
CollectionManager
IOException
- on I/O errorpublic Iterable<MFile> getFiles()
CollectionManager
public void setFiles(Iterable<MFile> files)
CollectionManager
public CalendarDate extractRunDate(MFile mfile)
CollectionManager
mfile
- extract from herepublic boolean hasDateExtractor()
CollectionManager
public CalendarDate getStartCollection()
CollectionManager
Copyright © 1999–2015 UCAR/Unidata. All rights reserved.