public final class ThresholdingConfigFactory extends Object
| Constructor and Description |
|---|
ThresholdingConfigFactory(InputStream stream)
Constructor for ThresholdingConfigFactory.
|
| Modifier and Type | Method and Description |
|---|---|
Group |
getGroup(String groupName)
getGroup
|
Collection<String> |
getGroupNames()
getGroupNames
|
static ThresholdingConfigFactory |
getInstance()
Return the singleton instance of this factory.
|
String |
getRrdRepository(String groupName)
Retrieves the configured path to the RRD file repository for the
specified thresholding group.
|
Collection<Basethresholddef> |
getThresholds(String groupName)
Retrieves a Collection object consisting of all the
org.opennms.netmgt.config.Threshold objects which make up the specified
thresholding group.
|
static void |
init()
Load the config from the default config file and create the singleton
instance of this factory.
|
static void |
reload()
Reload the config from the default config file
|
void |
saveCurrent()
Saves the current in-memory configuration to disk and reloads
|
static void |
setInstance(ThresholdingConfigFactory instance)
setInstance
|
void |
update()
update
|
public ThresholdingConfigFactory(InputStream stream) throws IOException
Constructor for ThresholdingConfigFactory.
stream - a InputStream object.IOExceptionpublic static void init()
throws IOException
IOException - Thrown if the specified config file cannot be readIOException - if any.public static void reload()
throws IOException
IOException - Thrown if the specified config file cannot be read/loadedIOException - if any.public static ThresholdingConfigFactory getInstance()
IllegalStateException - Thrown if the factory has not yet been initialized.public static void setInstance(ThresholdingConfigFactory instance)
setInstance
instance - a ThresholdingConfigFactory object.public String getRrdRepository(String groupName)
groupName - Group name to lookupIllegalArgumentException - if group name does not exist in the group map.public Collection<Basethresholddef> getThresholds(String groupName)
groupName - Group name to lookupIllegalArgumentException - if group name does not exist in the group map.public Collection<String> getGroupNames()
getGroupNames
Collection object.public void saveCurrent()
throws IOException
IOException - if any.public void update()
throws IOException
update
IOException - if any.Copyright © 2020. All rights reserved.