public abstract class AbstractThresholdEvaluatorState<T extends org.opennms.netmgt.threshd.AbstractThresholdEvaluatorState.AbstractState> extends Object implements ThresholdEvaluatorState
Abstract AbstractThresholdEvaluatorState class.
ThresholdEvaluatorState.Status, ThresholdEvaluatorState.ValueStatus| Modifier and Type | Field and Description |
|---|---|
static String |
FORMATED_NAN |
static org.nustaq.serialization.FSTConfiguration |
fst |
protected T |
state |
protected ThresholdingSession |
thresholdingSession |
| Modifier and Type | Method and Description |
|---|---|
void |
clearState()
clearState
|
protected abstract void |
clearStateBeforePersist() |
protected Event |
createBasicEvent(String uei,
Date date,
double dsValue,
CollectionResourceWrapper resource,
Map<String,String> additionalParams)
createBasicEvent
|
ThresholdEvaluatorState.Status |
evaluate(double dsValue,
Long sequenceNumber) |
ThresholdEvaluatorState.ValueStatus |
evaluate(ExpressionThresholdValue valueSupplier,
Long sequenceNumber) |
protected abstract ThresholdEvaluatorState.Status |
evaluateAfterFetch(double dsValue) |
protected String |
formatValue(double value)
formatValue
|
ThresholdingSession |
getThresholdingSession() |
protected abstract void |
initializeState() |
protected void |
markDirty()
Marks the state for this evaluator as dirty.
|
void |
reinitialize() |
void |
setInstance(String instance) |
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.ValueStatus evaluate(ExpressionThresholdValue valueSupplier, 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)
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.