Package org.opennms.netmgt.threshd
Interface ThresholdEvaluatorState
- 
- All Superinterfaces:
 ReinitializableState
- All Known Implementing Classes:
 AbstractThresholdEvaluatorState,ThresholdEvaluatorAbsoluteChange.ThresholdEvaluatorStateAbsoluteChange,ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow,ThresholdEvaluatorRearmingAbsoluteChange.ThresholdEvaluatorStateRearmingAbsoluteChange,ThresholdEvaluatorRelativeChange.ThresholdEvaluatorStateRelativeChange
public interface ThresholdEvaluatorState extends ReinitializableState
Provides a method to evaluate a threshold and do basic population of events. There is an instance of ThresholdEvaluatorState for each configured thresholding type on each configured data source on each configured node/interface/etc.. The object that implements this interface usually also stores state (hence the name).- Version:
 - $Id: $
 - Author:
 - ranger
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classThresholdEvaluatorState.Statusstatic classThresholdEvaluatorState.ThresholdValuesstatic classThresholdEvaluatorState.ValueStatus 
- 
Method Summary
- 
Methods inherited from interface org.opennms.netmgt.threshd.api.ReinitializableState
reinitialize 
 - 
 
 - 
 
- 
- 
Method Detail
- 
evaluate
default ThresholdEvaluatorState.Status evaluate(double dsValue)
evaluate
- Parameters:
 dsValue- a double.- Returns:
 - a 
ThresholdEvaluatorState.Statusobject. 
 
- 
evaluate
ThresholdEvaluatorState.Status evaluate(double dsValue, java.lang.Long sequenceNumber)
 
- 
evaluate
ThresholdEvaluatorState.Status evaluate(double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues, java.lang.Long sequenceNumber)
 
- 
evaluate
ThresholdEvaluatorState.ValueStatus evaluate(ExpressionThresholdValueSupplier valueSupplier, java.lang.Long sequenceNumber) throws ThresholdExpressionException
- Returns:
 - the value that was evaluated along with the resulting status
 - Throws:
 ThresholdExpressionException
 
- 
evaluate
ThresholdEvaluatorState.ValueStatus evaluate(ThresholdValuesSupplier thresholdValuesSupplier, java.lang.Long sequenceNumber) throws ThresholdExpressionException
- Returns:
 - the value that was evaluated along with the resulting status
 - Throws:
 ThresholdExpressionException
 
- 
getEventForState
Event getEventForState(ThresholdEvaluatorState.Status status, java.util.Date date, double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues, CollectionResourceWrapper resource)
getEventForState
- Parameters:
 status- aThresholdEvaluatorState.Statusobject.date- aDateobject.dsValue- a double.thresholdValues-resource- aCollectionResourceWrapperobject. @return aEventobject.
 
- 
isTriggered
boolean isTriggered()
Return true if current state is TRIGGERED- Returns:
 - a boolean.
 
 
- 
clearState
void clearState()
clearState
 
- 
getThresholdConfig
BaseThresholdDefConfigWrapper getThresholdConfig()
getThresholdConfig
- Returns:
 - a 
BaseThresholdDefConfigWrapperobject. 
 
- 
getCleanClone
ThresholdEvaluatorState getCleanClone()
Returns a "clean" (armed, non-triggered) clone of this object- Returns:
 - a 
ThresholdEvaluatorStateobject. 
 
- 
getThresholdingSession
ThresholdingSession getThresholdingSession()
 
- 
setInstance
void setInstance(java.lang.String instance)
 
 - 
 
 -