|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.threshd.ThresholdEntity
public final class ThresholdEntity
Wraps the castor created org.opennms.netmgt.config.threshd.Threshold class and provides the ability to track threshold exceeded occurrences.
| Constructor Summary | |
|---|---|
ThresholdEntity()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addThreshold(BaseThresholdDefConfigWrapper threshold)
|
ThresholdEntity |
clone()
Returns a copy of this ThresholdEntity object. |
List<Event> |
evaluateAndCreateEvents(Map<String,Double> values,
Date date)
Evaluates the threshold in light of the provided datasource value and create any events for thresholds. |
List<Event> |
evaluateAndCreateEvents(String instance,
Map<String,Double> values,
Date date)
Evaluates the threshold in light of the provided datasource value, for the named instance (or the generic instance if instance is null) and create any events for thresholds. |
Double |
fetchLastValue(LatencyInterface latIface,
LatencyParameters latParms)
|
String |
getDataSourceExpression()
Get datasource name |
String |
getDatasourceLabel()
Get datasource Label |
String |
getDatasourceType()
Get datasource type |
Collection<String> |
getRequiredDatasources()
Returns the names of the dataousrces required to evaluate this threshold entity |
BaseThresholdDefConfigWrapper |
getThresholdConfig()
|
static List<ThresholdEvaluator> |
getThresholdEvaluators()
|
List<ThresholdEvaluatorState> |
getThresholdEvaluatorStates(String instance)
Returns the evaluator states *for the given instance. |
String |
toString()
This method is responsible for returning a String object which represents the content of this ThresholdEntity. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ThresholdEntity()
| Method Detail |
|---|
public BaseThresholdDefConfigWrapper getThresholdConfig()
public String getDataSourceExpression()
public String getDatasourceType()
public String getDatasourceLabel()
public Collection<String> getRequiredDatasources()
public ThresholdEntity clone()
clone in class Objectpublic String toString()
toString in class Object
public List<Event> evaluateAndCreateEvents(Map<String,Double> values,
Date date)
values - map of values (by datasource name) to evaluate against the threshold (might be an expression)date - Date to use in created events
public List<Event> evaluateAndCreateEvents(String instance,
Map<String,Double> values,
Date date)
instance - The name of the instance of this threshold to check (e.g. the index of the GenericIndexResourcevalues - map of values (by datasource name) to evaluate against the threshold (might be an expression)date - Date to use in created events
public Double fetchLastValue(LatencyInterface latIface,
LatencyParameters latParms)
throws ThresholdingException
ThresholdingExceptionpublic void addThreshold(BaseThresholdDefConfigWrapper threshold)
public List<ThresholdEvaluatorState> getThresholdEvaluatorStates(String instance)
instance - The key to use to identify the instnace to get states for. Can be null to get the default instance
public static final List<ThresholdEvaluator> getThresholdEvaluators()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||