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 class
ThresholdEvaluatorState.Status
static class
ThresholdEvaluatorState.ThresholdValues
static class
ThresholdEvaluatorState.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.Status
object.
-
evaluate
ThresholdEvaluatorState.Status evaluate(double dsValue, Long sequenceNumber)
-
evaluate
ThresholdEvaluatorState.Status evaluate(double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues, Long sequenceNumber)
-
evaluate
ThresholdEvaluatorState.ValueStatus evaluate(ExpressionThresholdValueSupplier valueSupplier, Long sequenceNumber) throws ThresholdExpressionException
- Returns:
- the value that was evaluated along with the resulting status
- Throws:
ThresholdExpressionException
-
evaluate
ThresholdEvaluatorState.ValueStatus evaluate(ThresholdValuesSupplier thresholdValuesSupplier, Long sequenceNumber) throws ThresholdExpressionException
- Returns:
- the value that was evaluated along with the resulting status
- Throws:
ThresholdExpressionException
-
getEventForState
Event getEventForState(ThresholdEvaluatorState.Status status, Date date, double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues, CollectionResourceWrapper resource)
getEventForState
- Parameters:
status
- aThresholdEvaluatorState.Status
object.date
- aDate
object.dsValue
- a double.thresholdValues
-resource
- aCollectionResourceWrapper
object. @return aEvent
object.
-
isTriggered
boolean isTriggered()
Return true if current state is TRIGGERED- Returns:
- a boolean.
-
clearState
void clearState()
clearState
-
getThresholdConfig
BaseThresholdDefConfigWrapper getThresholdConfig()
getThresholdConfig
- Returns:
- a
BaseThresholdDefConfigWrapper
object.
-
getCleanClone
ThresholdEvaluatorState getCleanClone()
Returns a "clean" (armed, non-triggered) clone of this object- Returns:
- a
ThresholdEvaluatorState
object.
-
getThresholdingSession
ThresholdingSession getThresholdingSession()
-
setInstance
void setInstance(String instance)
-
-