Package org.opennms.netmgt.threshd
Class ThresholdingSessionImpl
- java.lang.Object
-
- org.opennms.netmgt.threshd.ThresholdingSessionImpl
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,ThresholdingSession
public class ThresholdingSessionImpl extends java.lang.Object implements ThresholdingSession
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
protected ResourceStorageDao
resourceStorageDao
protected RrdRepository
rrdRepository
protected ThresholdingServiceImpl
service
protected ThresholdingSessionKey
sessionKey
-
Constructor Summary
Constructors Constructor Description ThresholdingSessionImpl(ThresholdingServiceImpl service, ThresholdingSessionKey sessionKey, ResourceStorageDao resourceStorageDao, RrdRepository rrdRepository, 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()
ResourceStorageDao
getResourceDao()
RrdRepository
getRrdRepository()
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
-
resourceStorageDao
protected final ResourceStorageDao resourceStorageDao
-
rrdRepository
protected final RrdRepository rrdRepository
-
-
Constructor Detail
-
ThresholdingSessionImpl
public ThresholdingSessionImpl(ThresholdingServiceImpl service, ThresholdingSessionKey sessionKey, ResourceStorageDao resourceStorageDao, RrdRepository rrdRepository, 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 java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
getKey
public ThresholdingSessionKey getKey()
- Specified by:
getKey
in interfaceThresholdingSession
-
getBlobStore
public BlobStore getBlobStore()
- Specified by:
getBlobStore
in interfaceThresholdingSession
-
getResourceDao
public ResourceStorageDao getResourceDao()
-
getRrdRepository
public RrdRepository getRrdRepository()
-
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
-
-