public class WmiDataCollectionConfigFactory extends Object
This class loads and presents the WMI data collection configuration file for use with the WMI performance collection classes.
Modifier and Type | Field and Description |
---|---|
protected boolean |
initialized
Boolean indicating if the init() method has been called.
|
protected static long |
m_lastModified
Timestamp of the WMI collection config, used to know when to reload from disk.
|
Constructor and Description |
---|
WmiDataCollectionConfigFactory(InputStream is)
Constructor for WmiDataCollectionConfigFactory.
|
WmiDataCollectionConfigFactory(String configFile)
Constructor for WmiDataCollectionConfigFactory.
|
Modifier and Type | Method and Description |
---|---|
static WmiDatacollectionConfig |
getConfig()
getConfig
|
static WmiDataCollectionConfigFactory |
getInstance()
Singleton static call to get the only instance that should exist
|
List<String> |
getRRAList(String cName)
getRRAList
|
String |
getRrdPath()
getRrdPath
|
RrdRepository |
getRrdRepository(String collectionName)
getRrdRepository
|
int |
getStep(String cName)
getStep
|
WmiCollection |
getWmiCollection(String collectionName)
getWmiCollection
|
static void |
init()
Be sure to call this method before calling getInstance().
|
void |
reload()
reload
|
static void |
setConfig(WmiDatacollectionConfig m_config)
setConfig
|
static void |
setInstance(WmiDataCollectionConfigFactory instance)
setInstance
|
protected void |
updateFromFile()
Reload the wmi-datacollection-config.xml file if it has been changed since we last
read it.
|
protected boolean initialized
protected static long m_lastModified
public WmiDataCollectionConfigFactory(String configFile) throws IOException
Constructor for WmiDataCollectionConfigFactory.
configFile
- a String
object.IOException
- if any.public WmiDataCollectionConfigFactory(InputStream is) throws IOException
Constructor for WmiDataCollectionConfigFactory.
is
- a InputStream
object.IOException
public static void init() throws IOException, FileNotFoundException
IOException
- if any.FileNotFoundException
- if any.public static WmiDataCollectionConfigFactory getInstance()
IllegalStateException
- if init has not been calledpublic static void setInstance(WmiDataCollectionConfigFactory instance)
setInstance
instance
- a WmiDataCollectionConfigFactory
object.public void reload() throws IOException, FileNotFoundException
reload
IOException
- if any.FileNotFoundException
- if any.protected void updateFromFile() throws IOException
IOException
- if any.public static WmiDatacollectionConfig getConfig()
getConfig
WmiDatacollectionConfig
object.public static void setConfig(WmiDatacollectionConfig m_config)
setConfig
m_config
- a WmiDatacollectionConfig
object.public WmiCollection getWmiCollection(String collectionName)
getWmiCollection
collectionName
- a String
object.WmiCollection
object.public RrdRepository getRrdRepository(String collectionName)
getRrdRepository
collectionName
- a String
object.RrdRepository
object.public int getStep(String cName)
getStep
cName
- a String
object.Copyright © 2021. All rights reserved.