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 IOException
Constructor for NSClientDataCollectionConfigFactory.
configFile
- a String
object.IOException
- if any.public Lock getReadLock()
public Lock getWriteLock()
public static void init() throws IOException, FileNotFoundException
IOException
- if any.FileNotFoundException
- 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
reload
IOException
- if any.FileNotFoundException
- if any.public NsclientCollection getNSClientCollection(String collectionName)
getNSClientCollection
collectionName
- a String
object.org.opennms.netmgt.config.nsclient.NsclientCollection
object.public RrdRepository getRrdRepository(String collectionName)
getRrdRepository
collectionName
- a String
object.RrdRepository
object.public int getStep(String cName)
getStep
cName
- a String
object.protected void updateFromFile() throws IOException
IOException
- if any.Copyright © 2021. All rights reserved.