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:
- Alejandro Galue, Craig Miskell
ThresholdingVisitor
protected ThresholdingVisitor(CollectorThresholdingSet thresholdingSet)
create
public static ThresholdingVisitor create(int nodeId,
String hostAddress,
String serviceName,
RrdRepository repo,
Map<String,String> params)
reload
public void reload()
visitResource
public void visitResource(CollectionResource resource)
- 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 © 2009. All Rights Reserved.