Interface ReadableThreshdDao
-
- All Superinterfaces:
ReadableDao<ThreshdConfiguration>
- All Known Subinterfaces:
OverrideableThreshdDao
,WriteableThreshdDao
- All Known Implementing Classes:
AbstractThreshdDao
,OnmsThreshdDao
,OverrideableThreshdDaoImpl
,SentinelThreshdDao
public interface ReadableThreshdDao extends ReadableDao<ThreshdConfiguration>
This is the singleton class used to load the configuration for the OpenNMS Thresholding Daemon from the threshd-configuration xml file. A mapping of the configured URLs to the iplist they contain is built at init() time so as to avoid numerous file reads.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
interfaceInPackage(java.lang.String iface, Package pkg)
This method is used to determine if the named interface is included in the passed package definition.void
rebuildPackageIpListMap()
This method is used to rebuild the package against iplist mapping when needed.static boolean
serviceInPackageAndEnabled(java.lang.String svcName, Package pkg)
Returns true if the service is part of the package and the status of the service is set to "on".-
Methods inherited from interface org.opennms.netmgt.config.dao.common.api.ReadableDao
getReadOnlyConfig, reload
-
-
-
-
Method Detail
-
rebuildPackageIpListMap
void rebuildPackageIpListMap()
This method is used to rebuild the package against iplist mapping when needed. When a node gained service event occurs, threshd has to determine which package the ip/service combination is in, but if the interface is a newly added one, the package iplist should be rebuilt so that threshd could know which package this ip/service pair is in.
-
interfaceInPackage
boolean interfaceInPackage(java.lang.String iface, Package pkg)
This method is used to determine if the named interface is included in the passed package definition. If the interface belongs to the package then a value of true is returned. If the interface does not belong to the package a false value is returned. Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.- Parameters:
iface
- The interface to test against the package.pkg
- The package to check for the inclusion of the interface.- Returns:
- True if the interface is included in the package, false otherwise.
-
serviceInPackageAndEnabled
static boolean serviceInPackageAndEnabled(java.lang.String svcName, Package pkg)
Returns true if the service is part of the package and the status of the service is set to "on". Returns false if the service is not in the package or it is but the status of the service is set to "off".- Parameters:
svcName
- The service name to lookup.pkg
- The package to lookup up service.- Returns:
- a boolean.
-
-