public abstract class CollectionManagerAbstract extends Object implements CollectionManager
CollectionManager.ChangeChecker, CollectionManager.Force, CollectionManager.TriggerEvent, CollectionManager.TriggerListener, CollectionManager.TriggerType
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
auxInfo |
protected CollectionManager.ChangeChecker |
changeChecker |
protected String |
collectionName |
protected org.slf4j.Logger |
logger |
protected FeatureCollectionConfig.ProtoChoice |
protoChoice |
protected TimeDuration |
recheck |
Modifier | Constructor and Description |
---|---|
protected |
CollectionManagerAbstract(String collectionName,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(CollectionManager.TriggerListener l)
Register to get Trigger events
|
static String |
cleanName(String name) |
void |
close()
Close and release any resources.
|
protected void |
createListenerManager() |
protected void |
deleteOld(Map<String,MFile> newMap) |
static void |
enableMetadataManager() |
Object |
getAuxInfo(String key) |
String |
getCollectionName()
The name of the collection
|
List<String> |
getFilenames() |
MFile |
getLatestFile() |
byte[] |
getMetadata(MFile file,
String key) |
long |
getOlderThanFilterInMSecs()
The "olderThan" amount in seconds.
|
int |
getProtoIndex(int n)
Choose Proto dataset as index from [0..n-1], based on configuration.
|
TimeDuration |
getRecheck()
Get how often to rescan
|
boolean |
isStatic()
static means doesnt need to be monitored for changes; can be externally triggered, or read in at startup.
|
void |
putAuxInfo(String key,
Object value) |
void |
putMetadata(MFile file,
String key,
byte[] value) |
void |
removeEventListener(CollectionManager.TriggerListener l) |
void |
resetProto()
Called by external program to tell the manager its time to switch the proto dataset.
|
void |
setChangeChecker(CollectionManager.ChangeChecker strat) |
void |
setStatic(boolean aStatic) |
void |
updateNocheck()
send event TriggerType.updateNocheck, which calls
call InvDatasetFeatureCollection.update(CollectionManager.Force.nocheck)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
extractRunDate, getFiles, getLastScanned, getRoot, getStartCollection, hasDateExtractor, isScanNeeded, scan, scanIfNeeded, setFiles
protected String collectionName
protected final org.slf4j.Logger logger
protected TimeDuration recheck
protected FeatureCollectionConfig.ProtoChoice protoChoice
protected CollectionManager.ChangeChecker changeChecker
protected CollectionManagerAbstract(String collectionName, org.slf4j.Logger logger)
public boolean isStatic()
CollectionManager
isStatic
in interface CollectionManager
public void setStatic(boolean aStatic)
public String getCollectionName()
CollectionManager
getCollectionName
in interface CollectionManager
public TimeDuration getRecheck()
CollectionManager
getRecheck
in interface CollectionManager
public long getOlderThanFilterInMSecs()
CollectionManager
getOlderThanFilterInMSecs
in interface CollectionManager
public void close()
CollectionManager
close
in interface CollectionManager
public List<String> getFilenames()
getFilenames
in interface CollectionManager
public MFile getLatestFile()
getLatestFile
in interface CollectionManager
public void setChangeChecker(CollectionManager.ChangeChecker strat)
setChangeChecker
in interface CollectionManager
public Object getAuxInfo(String key)
getAuxInfo
in interface CollectionManager
public void putAuxInfo(String key, Object value)
putAuxInfo
in interface CollectionManager
public int getProtoIndex(int n)
CollectionManager
getProtoIndex
in interface CollectionManager
n
- size to choose frompublic static void enableMetadataManager()
public void updateNocheck() throws IOException
CollectionManager
updateNocheck
in interface CollectionManager
IOException
public void resetProto()
CollectionManager
resetProto
in interface CollectionManager
public void addEventListener(CollectionManager.TriggerListener l)
CollectionManager
addEventListener
in interface CollectionManager
l
- listenerpublic void removeEventListener(CollectionManager.TriggerListener l)
removeEventListener
in interface CollectionManager
protected void createListenerManager()
Copyright © 1999–2013 UCAR/Unidata. All rights reserved.