Package com.qfs.snl.persistence
Interface IMaintenanceService
- All Known Implementing Classes:
MaintenanceService
public interface IMaintenanceService
Definition of a service performing maintenance operations on ActiveMonitor database.
- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAlerts
(long monitorId, boolean onlyStopped) Clear alerts associated to a specific monitor.void
clearEvents
(long monitorId) Clear all events associated to a specific monitor regardless of their timestamp, as well as the alerts associated to them.void
clearEvents
(long monitorId, TimePeriod timePeriod) Clear all events associated to a specific monitor for a given time period, as well as the corresponding alerts.void
clearEvents
(String site, TimePeriod timePeriod) Clear all events of a given time period linked to any monitors on the specified site, as well as their associated alerts.void
clearEvents
(List<Long> events) Clear a list of events from the database, as well as all alerts associated to them.void
Clear events and their associated alerts from the database for every monitor, keeping only the latest one for each active distinct resource in each monitor.void
clearEventsHistory
(String site) Clear the events and their associated alerts for all monitors on a particular site, keeping only the latest event for each active distinct resource in each monitor.void
clearEventsHistory
(String site, long monitorId) Clear the events and their associated alerts for a particular monitor, keeping only the latest one for each active distinct resource.
-
Method Details
-
clearEvents
Clear a list of events from the database, as well as all alerts associated to them.- Parameters:
events
- the ids of the events to clear
-
clearEvents
void clearEvents(long monitorId) Clear all events associated to a specific monitor regardless of their timestamp, as well as the alerts associated to them.- Parameters:
monitorId
- the monitor id
-
clearEvents
Clear all events associated to a specific monitor for a given time period, as well as the corresponding alerts.- Parameters:
monitorId
- the monitor idtimePeriod
- the time period. The lower bound is inclusive, but the higher bound is exclusive.
-
clearEvents
Clear all events of a given time period linked to any monitors on the specified site, as well as their associated alerts.- Parameters:
site
- the sitetimePeriod
- the timePeriod. If null, events will be cleard regardless of their timestamp. The lower bound is inclusive, but the higher bound is exclusive.
-
clearEventsHistory
Clear the events and their associated alerts for a particular monitor, keeping only the latest one for each active distinct resource.- Parameters:
site
- the monitor's sitemonitorId
- the monitor id
-
clearEventsHistory
Clear the events and their associated alerts for all monitors on a particular site, keeping only the latest event for each active distinct resource in each monitor.- Parameters:
site
- the site
-
clearEventsHistory
void clearEventsHistory()Clear events and their associated alerts from the database for every monitor, keeping only the latest one for each active distinct resource in each monitor. -
clearAlerts
void clearAlerts(long monitorId, boolean onlyStopped) Clear alerts associated to a specific monitor.- Parameters:
monitorId
- the monitor id.onlyStopped
- if true, only inactive alerts will be deleted. Otherwise, all alerts associated to the given monitor will be deleted.
-