Package org.opennms.netmgt.threshd
Class ThresholdingSetImpl
- java.lang.Object
-
- org.opennms.netmgt.threshd.ThresholdingSetImpl
-
- All Implemented Interfaces:
ThresholdingSet
public class ThresholdingSetImpl extends java.lang.Object implements ThresholdingSet
Abstract ThresholdingSet class.
- Author:
- Alejandro Galue
-
-
Field Summary
Fields Modifier and Type Field Description protected ThresholdingEventProxy
m_eventProxy
protected java.lang.String
m_hostAddress
protected int
m_nodeId
protected RrdRepository
m_repository
protected ResourceStorageDao
m_resourceStorageDao
protected java.util.List<java.lang.String>
m_scheduledOutages
protected java.lang.String
m_serviceName
protected java.util.List<ThresholdGroup>
m_thresholdGroups
protected ThresholdsDao
m_thresholdsDao
-
Constructor Summary
Constructors Constructor Description ThresholdingSetImpl(int nodeId, java.lang.String hostAddress, java.lang.String serviceName, RrdRepository repository, ServiceParameters svcParams, ResourceStorageDao resourceStorageDao, ThresholdingEventProxy eventProxy, ThresholdingSession thresholdingSession, ReadableThreshdDao threshdDao, ReadableThresholdingDao thresholdingDao, ReadablePollOutagesDao pollOutagesDao, IfLabel ifLabelDao, EntityScopeProvider entityScopeProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Event>
applyThresholds(CollectionResource resource, java.util.Map<java.lang.String,CollectionAttribute> attributesMap, java.util.Date collectionTimestamp, java.lang.Long sequenceNumber)
protected java.util.List<Event>
applyThresholds(CollectionResourceWrapper resourceWrapper, java.util.Map<java.lang.String,CollectionAttribute> attributesMap)
int
getNodeId()
java.util.List<java.lang.String>
getscheduledOutages()
java.util.List<ThresholdGroup>
getThresholdGroups()
boolean
hasThresholds()
boolean
hasThresholds(CollectionAttribute attribute)
protected void
initialize()
protected void
initThresholdsDao()
boolean
isNodeInOutage()
protected boolean
passedThresholdFilters(CollectionResourceWrapper resource, ThresholdEntity thresholdEntity)
void
reinitialize()
void
setCounterReset(boolean counterReset)
java.lang.String
toString()
protected void
updateScheduledOutages()
-
-
-
Field Detail
-
m_nodeId
protected final int m_nodeId
-
m_hostAddress
protected final java.lang.String m_hostAddress
-
m_serviceName
protected final java.lang.String m_serviceName
-
m_repository
protected final RrdRepository m_repository
-
m_thresholdsDao
protected ThresholdsDao m_thresholdsDao
-
m_eventProxy
protected ThresholdingEventProxy m_eventProxy
-
m_resourceStorageDao
protected ResourceStorageDao m_resourceStorageDao
-
m_thresholdGroups
protected final java.util.List<ThresholdGroup> m_thresholdGroups
-
m_scheduledOutages
protected final java.util.List<java.lang.String> m_scheduledOutages
-
-
Constructor Detail
-
ThresholdingSetImpl
public ThresholdingSetImpl(int nodeId, java.lang.String hostAddress, java.lang.String serviceName, RrdRepository repository, ServiceParameters svcParams, ResourceStorageDao resourceStorageDao, ThresholdingEventProxy eventProxy, ThresholdingSession thresholdingSession, ReadableThreshdDao threshdDao, ReadableThresholdingDao thresholdingDao, ReadablePollOutagesDao pollOutagesDao, IfLabel ifLabelDao, EntityScopeProvider entityScopeProvider) throws ThresholdInitializationException
- Throws:
ThresholdInitializationException
-
-
Method Detail
-
initialize
protected void initialize() throws ThresholdInitializationException
- Throws:
ThresholdInitializationException
-
reinitialize
public void reinitialize()
- Specified by:
reinitialize
in interfaceThresholdingSet
-
hasThresholds
public boolean hasThresholds()
-
isNodeInOutage
public final boolean isNodeInOutage()
-
applyThresholds
protected final java.util.List<Event> applyThresholds(CollectionResourceWrapper resourceWrapper, java.util.Map<java.lang.String,CollectionAttribute> attributesMap)
-
passedThresholdFilters
protected boolean passedThresholdFilters(CollectionResourceWrapper resource, ThresholdEntity thresholdEntity)
-
initThresholdsDao
protected final void initThresholdsDao() throws ThresholdInitializationException
- Throws:
ThresholdInitializationException
-
updateScheduledOutages
protected void updateScheduledOutages()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setCounterReset
public void setCounterReset(boolean counterReset)
-
hasThresholds
public boolean hasThresholds(CollectionAttribute attribute)
-
applyThresholds
public java.util.List<Event> applyThresholds(CollectionResource resource, java.util.Map<java.lang.String,CollectionAttribute> attributesMap, java.util.Date collectionTimestamp, java.lang.Long sequenceNumber)
-
getThresholdGroups
public java.util.List<ThresholdGroup> getThresholdGroups()
-
getNodeId
public int getNodeId()
-
getscheduledOutages
public java.util.List<java.lang.String> getscheduledOutages()
-
-