public abstract class AbstractThresholdEvaluatorState<T extends org.opennms.netmgt.threshd.AbstractThresholdEvaluatorState.AbstractState> extends Object implements ThresholdEvaluatorState
Abstract AbstractThresholdEvaluatorState class.
ThresholdEvaluatorState.Status, ThresholdEvaluatorState.ThresholdValues, ThresholdEvaluatorState.ValueStatus| Modifier and Type | Field and Description |
|---|---|
static String |
FORMATED_NAN |
static org.nustaq.serialization.FSTConfiguration |
fst |
protected T |
state |
protected ThresholdingSession |
thresholdingSession |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevaluate, getCleanClone, getEventForState, getThresholdConfig, isTriggeredpublic static final String FORMATED_NAN
public static final org.nustaq.serialization.FSTConfiguration fst
protected T extends org.opennms.netmgt.threshd.AbstractThresholdEvaluatorState.AbstractState state
protected final ThresholdingSession thresholdingSession
protected abstract void initializeState()
protected void markDirty()
persistStateIfNeeded() is called.
Any operation that alters the state enough that it would affect threshold evaluation should call this method to mark the state dirty.
public ThresholdEvaluatorState.Status evaluate(double dsValue, Long sequenceNumber)
evaluate in interface ThresholdEvaluatorStatepublic ThresholdEvaluatorState.Status evaluate(double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues, Long sequenceNumber)
evaluate in interface ThresholdEvaluatorStatepublic ThresholdEvaluatorState.ValueStatus evaluate(ExpressionThresholdValueSupplier valueSupplier, Long sequenceNumber) throws ThresholdExpressionException
evaluate in interface ThresholdEvaluatorStateThresholdExpressionExceptionpublic ThresholdEvaluatorState.ValueStatus evaluate(ThresholdValuesSupplier thresholdValuesSupplier, Long sequenceNumber) throws ThresholdExpressionException
evaluate in interface ThresholdEvaluatorStateThresholdExpressionExceptionpublic void clearState()
ThresholdEvaluatorStateclearState
clearState in interface ThresholdEvaluatorStatepublic void reinitialize()
reinitialize in interface ReinitializableStateprotected abstract void clearStateBeforePersist()
protected abstract ThresholdEvaluatorState.Status evaluateAfterFetch(double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues)
protected Event createBasicEvent(String uei, Date date, double dsValue, CollectionResourceWrapper resource, Map<String,String> additionalParams)
createBasicEvent
uei - a String object.date - a Date object.dsValue - a double.resource - a CollectionResourceWrapper object.additionalParams - a Map object.Event object.protected String formatValue(double value)
formatValue
public ThresholdingSession getThresholdingSession()
getThresholdingSession in interface ThresholdEvaluatorStatepublic void setInstance(String instance)
setInstance in interface ThresholdEvaluatorStateCopyright © 2022. All rights reserved.