public class NSClientDataCollectionConfigFactory extends Object
NSClientDataCollectionConfigFactory class.
| Modifier and Type | Field and Description | 
|---|---|
protected static long | 
m_lastModified
Timestamp of the nsclient collection config, used to know when to reload from disk. 
 | 
| Constructor and Description | 
|---|
NSClientDataCollectionConfigFactory(String configFile)
Constructor for NSClientDataCollectionConfigFactory. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static NSClientDataCollectionConfigFactory | 
getInstance()
Singleton static call to get the only instance that should exist 
 | 
NsclientCollection | 
getNSClientCollection(String collectionName)
getNSClientCollection 
 | 
Lock | 
getReadLock()  | 
List<String> | 
getRRAList(String cName)
getRRAList 
 | 
String | 
getRrdPath()
getRrdPath 
 | 
RrdRepository | 
getRrdRepository(String collectionName)
getRrdRepository 
 | 
int | 
getStep(String cName)
getStep 
 | 
Lock | 
getWriteLock()  | 
static void | 
init()
Be sure to call this method before calling getInstance(). 
 | 
void | 
reload()
reload 
 | 
static void | 
setInstance(NSClientDataCollectionConfigFactory instance)
setInstance 
 | 
protected void | 
updateFromFile()
Reload the nsclient-datacollection-config.xml file if it has been changed since we last
 read it. 
 | 
protected static long m_lastModified
public NSClientDataCollectionConfigFactory(String configFile) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, IOException
Constructor for NSClientDataCollectionConfigFactory.
configFile - a String object.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.IOException - if any.public Lock getReadLock()
public Lock getWriteLock()
public static void init()
                 throws IOException,
                        FileNotFoundException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException
IOException - if any.FileNotFoundException - if any.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.public static NSClientDataCollectionConfigFactory getInstance()
IllegalStateException - if init has not been calledpublic static void setInstance(NSClientDataCollectionConfigFactory instance)
setInstance
instance - a NSClientDataCollectionConfigFactory object.public void reload()
            throws IOException,
                   FileNotFoundException,
                   org.exolab.castor.xml.MarshalException,
                   org.exolab.castor.xml.ValidationException
reload
IOException - if any.FileNotFoundException - if any.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.public NsclientCollection getNSClientCollection(String collectionName)
getNSClientCollection
collectionName - a String object.NsclientCollection object.public RrdRepository getRrdRepository(String collectionName)
getRrdRepository
collectionName - a String object.RrdRepository object.protected void updateFromFile()
                       throws IOException,
                              org.exolab.castor.xml.MarshalException,
                              org.exolab.castor.xml.ValidationException
IOException - if any.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.Copyright © 2015. All rights reserved.