org.opennms.netmgt.threshd
Class ThresholdingVisitor
java.lang.Object
org.opennms.netmgt.collectd.AbstractCollectionSetVisitor
org.opennms.netmgt.threshd.ThresholdingVisitor
- All Implemented Interfaces:
- CollectionSetVisitor
public class ThresholdingVisitor
- extends AbstractCollectionSetVisitor
Implements CollectionSetVisitor to implement thresholding.
Works by simply recording all the attributes that come in via visitAttribute
into an internal data structure, per resource, and then on "completeResource", does
threshold checking against that in memory structure.
Suggested usage is one per CollectableService; this object holds the current state of thresholds
for this interface/service combination
(so perhaps needs a better name than ThresholdingVisitor)
- Author:
- opennms
handleThresholdConfigChanged
public static void handleThresholdConfigChanged()
createThresholdingVisitor
public static ThresholdingVisitor createThresholdingVisitor(int nodeId,
String hostAddress,
String serviceName,
org.opennms.netmgt.model.RrdRepository repo,
Map params)
initThresholdState
public void initThresholdState()
- Causes a new set of ThresholdEntity instances (i.e. threshold states) to be obtained for this visitor, at some appropraite
point in the near future
Can be called when thresholding configuration has changed and we need to refresh the threshold state
visitResource
public void visitResource(CollectionResource resource)
- When called, we're starting a new resource. Clears out any stored attribute values from previous resource visits
- Specified by:
visitResource in interface CollectionSetVisitor- Overrides:
visitResource in class AbstractCollectionSetVisitor
visitAttribute
public void visitAttribute(CollectionAttribute attribute)
- Specified by:
visitAttribute in interface CollectionSetVisitor- Overrides:
visitAttribute in class AbstractCollectionSetVisitor
completeResource
public void completeResource(CollectionResource resource)
- Specified by:
completeResource in interface CollectionSetVisitor- Overrides:
completeResource in class AbstractCollectionSetVisitor
toString
public String toString()
- Overrides:
toString in class Object
Copyright ? 2008. All Rights Reserved.