Package com.qfs.snl.persistence
Interface ISentinelAlertDao
- All Superinterfaces:
ICreateDao<SentinelAlert>
,IIdentifiableReadDao<SentinelAlert>
,IUpdateDao<SentinelAlert>
- All Known Implementing Classes:
SentinelAlertDao
public interface ISentinelAlertDao
extends ICreateDao<SentinelAlert>, IIdentifiableReadDao<SentinelAlert>, IUpdateDao<SentinelAlert>
The ActiveMonitor alert data access object.
- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionfind
(boolean activeOnly, Collection<Long> monitorIds, ITimePeriod timePeriod) Finds alerts with complex conditions.getAll
(boolean active) Get all alerts.getFromMonitorId
(long id) Gets all the alerts for a particular monitor id.stop
(SentinelAlert alert) Stops an alert.stop
(List<SentinelAlert> alerts) Stops a collection of alerts.stopAlert
(long id) Stop the alert by id.stopForMonitor
(String site, long monitorId) Stops all alerts of a given monitor.Methods inherited from interface com.qfs.snl.persistence.ICreateDao
create, create
Methods inherited from interface com.qfs.snl.persistence.IIdentifiableReadDao
get, getAll
Methods inherited from interface com.qfs.snl.persistence.IUpdateDao
update, update
-
Method Details
-
getAll
Get all alerts.- Parameters:
active
- the status of the alerts- Returns:
- the alerts
-
getFromMonitorId
Gets all the alerts for a particular monitor id.- Parameters:
id
- the id of the monitor- Returns:
- the alerts related to that monitor
-
find
Collection<SentinelAlert> find(boolean activeOnly, Collection<Long> monitorIds, ITimePeriod timePeriod) Finds alerts with complex conditions.- Parameters:
activeOnly
- flag to only retrieve active alerts, false to retrieve allmonitorIds
- list of monitor ids to consider, null or empty to consider all monitorstimePeriod
- time period to consider It will apply boundaries on alerts, requiring that they either started or stopped in the period. From time is included in the window, to is excluded, i.e.from <= start|stop < to
.- Returns:
- alerts fulfilling all conditions
-
stop
Stops an alert.- Parameters:
alert
- alert to stop- Returns:
- the stopped alert
-
stop
Stops a collection of alerts.- Parameters:
alerts
- alerts to stop- Returns:
- the stopped alerts
-
stopAlert
Stop the alert by id.- Parameters:
id
- the id of the alert- Returns:
- the stopped alert
-
stopForMonitor
Stops all alerts of a given monitor.- Parameters:
site
- monitor sitemonitorId
- monitor id- Returns:
- list of stopped alerts
-