public class ConditionEvaluator extends Object
ConditionExpression eval expression string. See
here for the supported expression format. The
expression syntax is extended with supported query variables of the form q(queryName,functionName)
where the queryName is a variable referring to a query defined for the ConditionExpression and
the functionName is a supported aggregate function for the query's MetricType. The query variables are
replaced with actual data at query time, before the eval expression is resolved.| Constructor and Description |
|---|
ConditionEvaluator(String eval) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate()
Evaluate the prepared condition {@see #prepare(Map)).
|
String |
getEval() |
com.udojava.evalex.Expression |
getExpression() |
Map<String,org.hawkular.metrics.alerter.ConditionEvaluator.QueryFunc> |
getQueryVars() |
Map<String,String> |
prepare(Map<String,org.hawkular.metrics.model.BucketPoint> queryMap)
Prepare to evaluate by supplying the required query data.
|
boolean |
prepareAndEvaluate(Map<String,org.hawkular.metrics.model.BucketPoint> queryMap)
Just a convenience method to prepare and evaluate in one call.
|
public ConditionEvaluator(String eval)
public String getEval()
public Map<String,String> prepare(Map<String,org.hawkular.metrics.model.BucketPoint> queryMap) throws IllegalArgumentException
data - Map queryName => queryResultsIllegalArgumentExceptionpublic boolean evaluate()
public boolean prepareAndEvaluate(Map<String,org.hawkular.metrics.model.BucketPoint> queryMap)
public Map<String,org.hawkular.metrics.alerter.ConditionEvaluator.QueryFunc> getQueryVars()
public com.udojava.evalex.Expression getExpression()
Copyright © 2014–2017 Red Hat, Inc.. All rights reserved.