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.LoggerLOGprotected ResourceStorageDaoresourceStorageDaoprotected RrdRepositoryrrdRepositoryprotected ThresholdingServiceImplserviceprotected ThresholdingSessionKeysessionKey
-
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 voidaccept(CollectionSet collectionSet)Accepts aCollectionSetfor threshold evaluation.voidclose()BlobStoregetBlobStore()ThresholdingSessionKeygetKey()ResourceStorageDaogetResourceDao()RrdRepositorygetRrdRepository()ServiceParametersgetServiceParameters()ThresholdStateMonitorgetThresholdStateMonitor()booleanisDistributed()
-
-
-
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:ThresholdingSessionAccepts aCollectionSetfor threshold evaluation. The service will sendEvents if Thresholds are triggered or re-armed.- Specified by:
acceptin 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:
closein interfaceAutoCloseable- Throws:
Exception
-
getKey
public ThresholdingSessionKey getKey()
- Specified by:
getKeyin interfaceThresholdingSession
-
getBlobStore
public BlobStore getBlobStore()
- Specified by:
getBlobStorein interfaceThresholdingSession
-
getResourceDao
public ResourceStorageDao getResourceDao()
-
getRrdRepository
public RrdRepository getRrdRepository()
-
getServiceParameters
public ServiceParameters getServiceParameters()
-
isDistributed
public boolean isDistributed()
- Specified by:
isDistributedin 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:
getThresholdStateMonitorin interfaceThresholdingSession
-
-