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, waitextractRunDate, getFiles, getLastChanged, getLastScanned, getRoot, getStartCollection, hasDateExtractor, isScanNeeded, scan, scanIfNeeded, setFilesprotected 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()
CollectionManagerisStatic in interface CollectionManagerpublic void setStatic(boolean aStatic)
public String getCollectionName()
CollectionManagergetCollectionName in interface CollectionManagerpublic TimeDuration getRecheck()
CollectionManagergetRecheck in interface CollectionManagerpublic long getOlderThanFilterInMSecs()
CollectionManagergetOlderThanFilterInMSecs in interface CollectionManagerpublic void close()
CollectionManagerclose in interface CollectionManagerpublic List<String> getFilenames()
getFilenames in interface CollectionManagerpublic MFile getLatestFile()
getLatestFile in interface CollectionManagerpublic void setChangeChecker(CollectionManager.ChangeChecker strat)
setChangeChecker in interface CollectionManagerpublic Object getAuxInfo(String key)
getAuxInfo in interface CollectionManagerpublic void putAuxInfo(String key, Object value)
putAuxInfo in interface CollectionManagerpublic int getProtoIndex(int n)
CollectionManagergetProtoIndex in interface CollectionManagern - size to choose frompublic static void enableMetadataManager()
public void updateNocheck()
throws IOException
CollectionManagerupdateNocheck in interface CollectionManagerIOExceptionpublic void resetProto()
CollectionManagerresetProto in interface CollectionManagerpublic void addEventListener(CollectionManager.TriggerListener l)
CollectionManageraddEventListener in interface CollectionManagerl - listenerpublic void removeEventListener(CollectionManager.TriggerListener l)
removeEventListener in interface CollectionManagerprotected void createListenerManager()
Copyright © 1999–2013 UCAR/Unidata. All rights reserved.