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 voidclearStateBeforePersist()ThresholdEvaluatorState.StatusevaluateAfterFetch(double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues)ThresholdEvaluatorStategetCleanClone()Returns a "clean" (armed, non-triggered) clone of this objectEventgetEventForState(ThresholdEvaluatorState.Status status, Date date, double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues, CollectionResourceWrapper resource)getEventForStateBaseThresholdDefConfigWrappergetThresholdConfig()getThresholdConfigprotected voidinitializeState()protected booleanisRearmExceeded(double dsValue)protected booleanisRearmExceeded(double dsValue, Double rearm)protected booleanisThresholdExceeded(double dsValue)protected booleanisThresholdExceeded(double dsValue, Double value)protected booleanisTriggerCountExceeded()protected booleanisTriggerCountExceeded(Integer trigger)booleanisTriggered()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:
initializeStatein classAbstractThresholdEvaluatorState<org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow.State>
-
getThresholdConfig
public BaseThresholdDefConfigWrapper getThresholdConfig()
Description copied from interface:ThresholdEvaluatorStategetThresholdConfig
- Returns:
- a
BaseThresholdDefConfigWrapperobject.
-
evaluateAfterFetch
public ThresholdEvaluatorState.Status evaluateAfterFetch(double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues)
- Specified by:
evaluateAfterFetchin 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:ThresholdEvaluatorStategetEventForState
- Parameters:
status- aThresholdEvaluatorState.Statusobject.date- aDateobject.dsValue- a double.resource- aCollectionResourceWrapperobject. @return aEventobject.
-
getCleanClone
public ThresholdEvaluatorState getCleanClone()
Description copied from interface:ThresholdEvaluatorStateReturns a "clean" (armed, non-triggered) clone of this object- Returns:
- a
ThresholdEvaluatorStateobject.
-
isTriggered
public boolean isTriggered()
Description copied from interface:ThresholdEvaluatorStateReturn true if current state is TRIGGERED- Returns:
- a boolean.
-
clearStateBeforePersist
public void clearStateBeforePersist()
- Specified by:
clearStateBeforePersistin classAbstractThresholdEvaluatorState<org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow.ThresholdEvaluatorStateHighLow.State>
-
-