public class MockLocationMonitorDao extends AbstractMockDao<OnmsLocationMonitor,String> implements LocationMonitorDao
AbstractMockDao.NullEventForwarder
Constructor and Description |
---|
MockLocationMonitorDao() |
Modifier and Type | Method and Description |
---|---|
Collection<OnmsLocationMonitor> |
findByApplication(OnmsApplication application)
findByApplication
|
Collection<OnmsLocationMonitor> |
findByLocationDefinition(OnmsMonitoringLocation locationDefinition)
findByLocationDefinition
|
Collection<LocationMonitorIpInterface> |
findStatusChangesForNodeForUniqueMonitorAndInterface(int nodeId)
findStatusChangesForNodeForUniqueMonitorAndInterface
|
protected void |
generateId(OnmsLocationMonitor mon) |
Collection<OnmsLocationSpecificStatus> |
getAllMostRecentStatusChanges()
getAllMostRecentStatusChanges
|
Collection<OnmsLocationSpecificStatus> |
getAllStatusChangesAt(Date timestamp)
getAllStatusChangesAt
|
protected String |
getId(OnmsLocationMonitor loc) |
OnmsLocationSpecificStatus |
getMostRecentStatusChange(OnmsLocationMonitor locationMonitor,
OnmsMonitoredService monSvc)
getMostRecentStatusChange
|
Collection<OnmsLocationSpecificStatus> |
getMostRecentStatusChangesForLocation(String locationName)
getMostRecentStatusChangesForLocation
|
Collection<OnmsLocationSpecificStatus> |
getStatusChangesBetween(Date startDate,
Date endDate)
Returns all status changes since the date, and one previous
status change (so that status at the beginning of the period can be
determined).
|
Collection<OnmsLocationSpecificStatus> |
getStatusChangesBetweenForApplications(Date startDate,
Date endDate,
Collection<String> applicationNames)
getStatusChangesBetweenForApplications
|
Collection<OnmsLocationSpecificStatus> |
getStatusChangesForApplicationBetween(Date startDate,
Date endDate,
String applicationName)
getStatusChangesForApplicationBetween
|
Collection<OnmsLocationSpecificStatus> |
getStatusChangesForLocationBetween(Date startDate,
Date endDate,
String locationDefinitionName)
getStatusChangesForLocationBetween
|
void |
pauseAll()
Mark all location monitors as paused except those that are already stopped
|
void |
resumeAll()
Mark all paused location monitors as started
|
void |
saveStatusChange(OnmsLocationSpecificStatus status)
saveStatusChange
|
afterPropertiesSet, clear, countAll, countMatching, countMatching, delete, delete, findAll, findMatching, findMatching, flush, get, getAlarmDao, getAssetRecordDao, getCategoryDao, getDistPollerDao, getEventDao, getIpInterfaceDao, getMonitoredServiceDao, getMonitoringLocationDao, getNodeDao, getServiceRegistry, getServiceTypeDao, getSnmpInterfaceDao, initialize, load, lock, save, saveOrUpdate, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, countAll, countMatching, delete, delete, findAll, findMatching, flush, get, initialize, load, lock, save, saveOrUpdate, update
protected void generateId(OnmsLocationMonitor mon)
generateId
in class AbstractMockDao<OnmsLocationMonitor,String>
protected String getId(OnmsLocationMonitor loc)
getId
in class AbstractMockDao<OnmsLocationMonitor,String>
public Collection<OnmsLocationMonitor> findByLocationDefinition(OnmsMonitoringLocation locationDefinition)
LocationMonitorDao
findByLocationDefinition
findByLocationDefinition
in interface LocationMonitorDao
locationDefinition
- a OnmsMonitoringLocation
object.Collection
object.public Collection<OnmsLocationMonitor> findByApplication(OnmsApplication application)
LocationMonitorDao
findByApplication
findByApplication
in interface LocationMonitorDao
application
- a OnmsApplication
object.Collection
object.public void saveStatusChange(OnmsLocationSpecificStatus status)
LocationMonitorDao
saveStatusChange
saveStatusChange
in interface LocationMonitorDao
status
- a OnmsLocationSpecificStatus
object.public OnmsLocationSpecificStatus getMostRecentStatusChange(OnmsLocationMonitor locationMonitor, OnmsMonitoredService monSvc)
LocationMonitorDao
getMostRecentStatusChange
getMostRecentStatusChange
in interface LocationMonitorDao
locationMonitor
- a OnmsLocationMonitor
object.monSvc
- a OnmsMonitoredService
object.OnmsLocationSpecificStatus
object.public Collection<OnmsLocationSpecificStatus> getAllMostRecentStatusChanges()
LocationMonitorDao
getAllMostRecentStatusChanges
getAllMostRecentStatusChanges
in interface LocationMonitorDao
Collection
object.public Collection<OnmsLocationSpecificStatus> getAllStatusChangesAt(Date timestamp)
LocationMonitorDao
getAllStatusChangesAt
getAllStatusChangesAt
in interface LocationMonitorDao
timestamp
- a Date
object.Collection
object.public Collection<OnmsLocationSpecificStatus> getStatusChangesBetween(Date startDate, Date endDate)
LocationMonitorDao
getStatusChangesBetween
in interface LocationMonitorDao
startDate
- a Date
object.endDate
- a Date
object.Collection
object.public Collection<OnmsLocationSpecificStatus> getStatusChangesForLocationBetween(Date startDate, Date endDate, String locationDefinitionName)
LocationMonitorDao
getStatusChangesForLocationBetween
getStatusChangesForLocationBetween
in interface LocationMonitorDao
startDate
- a Date
object.endDate
- a Date
object.locationDefinitionName
- a String
object.Collection
object.public Collection<OnmsLocationSpecificStatus> getStatusChangesForApplicationBetween(Date startDate, Date endDate, String applicationName)
LocationMonitorDao
getStatusChangesForApplicationBetween
getStatusChangesForApplicationBetween
in interface LocationMonitorDao
startDate
- a Date
object.endDate
- a Date
object.applicationName
- a String
object.Collection
object.public Collection<OnmsLocationSpecificStatus> getStatusChangesBetweenForApplications(Date startDate, Date endDate, Collection<String> applicationNames)
LocationMonitorDao
getStatusChangesBetweenForApplications
getStatusChangesBetweenForApplications
in interface LocationMonitorDao
startDate
- a Date
object.endDate
- a Date
object.Collection
object.public Collection<OnmsLocationSpecificStatus> getMostRecentStatusChangesForLocation(String locationName)
LocationMonitorDao
getMostRecentStatusChangesForLocation
getMostRecentStatusChangesForLocation
in interface LocationMonitorDao
locationName
- a String
object.Collection
object.public Collection<LocationMonitorIpInterface> findStatusChangesForNodeForUniqueMonitorAndInterface(int nodeId)
LocationMonitorDao
findStatusChangesForNodeForUniqueMonitorAndInterface
findStatusChangesForNodeForUniqueMonitorAndInterface
in interface LocationMonitorDao
nodeId
- a int.Collection
object.public void pauseAll()
LocationMonitorDao
pauseAll
in interface LocationMonitorDao
public void resumeAll()
LocationMonitorDao
resumeAll
in interface LocationMonitorDao
Copyright © 2021. All rights reserved.