Package org.opennms.netmgt.threshd
Class ThresholdingSessionImpl
- java.lang.Object
-
- org.opennms.netmgt.threshd.ThresholdingSessionImpl
-
- All Implemented Interfaces:
AutoCloseable
,ThresholdingSession
public class ThresholdingSessionImpl extends Object implements ThresholdingSession
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
protected ThresholdingServiceImpl
service
protected ThresholdingSessionKey
sessionKey
-
Constructor Summary
Constructors Constructor Description ThresholdingSessionImpl(ThresholdingServiceImpl service, ThresholdingSessionKey sessionKey, ServiceParameters serviceParams, BlobStore blobStore, boolean isDistributed, ThresholdStateMonitor thresholdStateMonitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(CollectionSet collectionSet)
Accepts aCollectionSet
for threshold evaluation.void
close()
BlobStore
getBlobStore()
ThresholdingSessionKey
getKey()
ServiceParameters
getServiceParameters()
ThresholdStateMonitor
getThresholdStateMonitor()
boolean
isDistributed()
-
-
-
Field Detail
-
LOG
protected static final org.slf4j.Logger LOG
-
service
protected final ThresholdingServiceImpl service
-
sessionKey
protected final ThresholdingSessionKey sessionKey
-
-
Constructor Detail
-
ThresholdingSessionImpl
public ThresholdingSessionImpl(ThresholdingServiceImpl service, ThresholdingSessionKey sessionKey, ServiceParameters serviceParams, BlobStore blobStore, boolean isDistributed, ThresholdStateMonitor thresholdStateMonitor)
-
-
Method Detail
-
accept
public void accept(CollectionSet collectionSet) throws ThresholdInitializationException
Description copied from interface:ThresholdingSession
Accepts aCollectionSet
for threshold evaluation. The service will sendEvent
s if Thresholds are triggered or re-armed.- Specified by:
accept
in interfaceThresholdingSession
- Throws:
ThresholdInitializationException
- if the Thresholding Configuration has not yet been initialized ot there is an error initializing it. I.E. reading as parsing the configuration files.
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getKey
public ThresholdingSessionKey getKey()
- Specified by:
getKey
in interfaceThresholdingSession
-
getBlobStore
public BlobStore getBlobStore()
- Specified by:
getBlobStore
in interfaceThresholdingSession
-
getServiceParameters
public ServiceParameters getServiceParameters()
-
isDistributed
public boolean isDistributed()
- Specified by:
isDistributed
in interfaceThresholdingSession
- Returns:
- true if we are thresholding in a distributed environment (i.e. Sentinel) false otherwise (i.e. OpenNMS)
-
getThresholdStateMonitor
public ThresholdStateMonitor getThresholdStateMonitor()
- Specified by:
getThresholdStateMonitor
in interfaceThresholdingSession
-
-