Package org.opennms.netmgt.threshd
Class ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow
- java.lang.Object
-
- org.opennms.netmgt.threshd.AbstractThresholdEvaluatorState<org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow.State>
-
- org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow
-
- All Implemented Interfaces:
ReinitializableState
,ThresholdEvaluatorState
- Enclosing class:
- ThresholdEvaluatorHighLow
public static class ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow extends AbstractThresholdEvaluatorState<org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow.State>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opennms.netmgt.threshd.ThresholdEvaluatorState
ThresholdEvaluatorState.Status, ThresholdEvaluatorState.ThresholdValues, ThresholdEvaluatorState.ValueStatus
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.threshd.AbstractThresholdEvaluatorState
FORMATED_NAN, fst, state, thresholdingSession
-
-
Constructor Summary
Constructors Constructor Description ThresholdEvaluatorStateHighLow(BaseThresholdDefConfigWrapper threshold, ThresholdingSession thresholdingSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearStateBeforePersist()
ThresholdEvaluatorState.Status
evaluateAfterFetch(double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues)
ThresholdEvaluatorState
getCleanClone()
Returns a "clean" (armed, non-triggered) clone of this objectEvent
getEventForState(ThresholdEvaluatorState.Status status, Date date, double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues, CollectionResourceWrapper resource)
getEventForStateBaseThresholdDefConfigWrapper
getThresholdConfig()
getThresholdConfigprotected void
initializeState()
protected boolean
isRearmExceeded(double dsValue)
protected boolean
isRearmExceeded(double dsValue, Double rearm)
protected boolean
isThresholdExceeded(double dsValue)
protected boolean
isThresholdExceeded(double dsValue, Double value)
protected boolean
isTriggerCountExceeded()
protected boolean
isTriggerCountExceeded(Integer trigger)
boolean
isTriggered()
Return true if current state is TRIGGERED-
Methods inherited from class org.opennms.netmgt.threshd.AbstractThresholdEvaluatorState
clearState, createBasicEvent, evaluate, evaluate, evaluate, evaluate, formatValue, getThresholdingSession, markDirty, reinitialize, setInstance
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.threshd.ThresholdEvaluatorState
evaluate
-
-
-
-
Constructor Detail
-
ThresholdEvaluatorStateHighLow
public ThresholdEvaluatorStateHighLow(BaseThresholdDefConfigWrapper threshold, ThresholdingSession thresholdingSession)
-
-
Method Detail
-
initializeState
protected void initializeState()
- Specified by:
initializeState
in classAbstractThresholdEvaluatorState<org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow.State>
-
getThresholdConfig
public BaseThresholdDefConfigWrapper getThresholdConfig()
Description copied from interface:ThresholdEvaluatorState
getThresholdConfig
- Returns:
- a
BaseThresholdDefConfigWrapper
object.
-
evaluateAfterFetch
public ThresholdEvaluatorState.Status evaluateAfterFetch(double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues)
- Specified by:
evaluateAfterFetch
in classAbstractThresholdEvaluatorState<org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow.State>
-
isThresholdExceeded
protected boolean isThresholdExceeded(double dsValue, Double value)
-
isThresholdExceeded
protected boolean isThresholdExceeded(double dsValue)
-
isRearmExceeded
protected boolean isRearmExceeded(double dsValue, Double rearm)
-
isRearmExceeded
protected boolean isRearmExceeded(double dsValue)
-
isTriggerCountExceeded
protected boolean isTriggerCountExceeded(Integer trigger)
-
isTriggerCountExceeded
protected boolean isTriggerCountExceeded()
-
getEventForState
public Event getEventForState(ThresholdEvaluatorState.Status status, Date date, double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues, CollectionResourceWrapper resource)
Description copied from interface:ThresholdEvaluatorState
getEventForState
- Parameters:
status
- aThresholdEvaluatorState.Status
object.date
- aDate
object.dsValue
- a double.resource
- aCollectionResourceWrapper
object. @return aEvent
object.
-
getCleanClone
public ThresholdEvaluatorState getCleanClone()
Description copied from interface:ThresholdEvaluatorState
Returns a "clean" (armed, non-triggered) clone of this object- Returns:
- a
ThresholdEvaluatorState
object.
-
isTriggered
public boolean isTriggered()
Description copied from interface:ThresholdEvaluatorState
Return true if current state is TRIGGERED- Returns:
- a boolean.
-
clearStateBeforePersist
public void clearStateBeforePersist()
- Specified by:
clearStateBeforePersist
in classAbstractThresholdEvaluatorState<org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow.State>
-
-