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, wait
evaluate, getCleanClone, getEventForState, getThresholdConfig, isTriggered
public 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 ThresholdEvaluatorState
public ThresholdEvaluatorState.Status evaluate(double dsValue, ThresholdEvaluatorState.ThresholdValues thresholdValues, Long sequenceNumber)
evaluate
in interface ThresholdEvaluatorState
public ThresholdEvaluatorState.ValueStatus evaluate(ExpressionThresholdValueSupplier valueSupplier, Long sequenceNumber) throws ThresholdExpressionException
evaluate
in interface ThresholdEvaluatorState
ThresholdExpressionException
public ThresholdEvaluatorState.ValueStatus evaluate(ThresholdValuesSupplier thresholdValuesSupplier, Long sequenceNumber) throws ThresholdExpressionException
evaluate
in interface ThresholdEvaluatorState
ThresholdExpressionException
public void clearState()
ThresholdEvaluatorState
clearState
clearState
in interface ThresholdEvaluatorState
public void reinitialize()
reinitialize
in interface ReinitializableState
protected 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 ThresholdEvaluatorState
public void setInstance(String instance)
setInstance
in interface ThresholdEvaluatorState
Copyright © 2021. All rights reserved.