public class MonitorService extends AbstractService implements IMonitorService
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Monitor> |
activeMonitorCache |
protected long |
activeMonitorCacheTime |
protected java.util.List<Notification> |
activeNotificationCache |
protected long |
activeNotificationCacheTime |
protected java.util.Map<java.lang.String,java.util.List<java.lang.Long>> |
averagesByType |
protected java.util.Map<java.lang.String,java.lang.Long> |
checkTimesByType |
protected IClusterService |
clusterService |
protected IContextService |
contextService |
protected IExtensionService |
extensionService |
protected java.lang.String |
hostName |
protected INodeService |
nodeService |
protected java.lang.String |
typeColumnName |
log, parameterService, platform, sqlTemplate, sqlTemplateDirty, symmetricDialect, tablePrefix| Constructor and Description |
|---|
MonitorService(IParameterService parameterService,
ISymmetricDialect symmetricDialect,
INodeService nodeService,
IExtensionService extensionService,
IClusterService clusterService,
IContextService contextService) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteMonitor(java.lang.String monitorId) |
void |
deleteMonitorEvent(MonitorEvent event) |
void |
deleteNotification(java.lang.String notificationId) |
void |
flushMonitorCache() |
void |
flushNotificationCache() |
java.util.List<Monitor> |
getActiveMonitorsForNode(java.lang.String nodeGroupId,
java.lang.String externalId) |
java.util.List<Monitor> |
getActiveMonitorsUnresolvedForNode(java.lang.String nodeGroupId,
java.lang.String externalId) |
java.util.List<Notification> |
getActiveNotificationsForNode(java.lang.String nodeGroupId,
java.lang.String externalId) |
java.util.List<MonitorEvent> |
getMonitorEvents() |
java.util.List<MonitorEvent> |
getMonitorEventsFiltered(int limit,
java.lang.String type,
int severityLevel,
java.lang.String nodeId,
java.lang.Boolean isResolved) |
protected java.util.List<MonitorEvent> |
getMonitorEventsForNotification(int severityLevel) |
protected java.util.Map<java.lang.String,MonitorEvent> |
getMonitorEventsNotResolvedForNode(java.lang.String nodeId) |
java.util.List<Monitor> |
getMonitors() |
java.util.List<Notification> |
getNotifications() |
protected void |
insertMonitorEvent(MonitorEvent event) |
void |
saveMonitor(Monitor monitor) |
void |
saveMonitorEvent(MonitorEvent event) |
void |
saveNotification(Notification notification) |
void |
update() |
protected void |
updateMonitor(Monitor monitor,
IMonitorType monitorType,
Node identity,
java.util.Map<java.lang.String,MonitorEvent> unresolved) |
protected boolean |
updateMonitorEvent(MonitorEvent event) |
protected void |
updateMonitorEventAsNotified(java.util.List<MonitorEvent> events) |
protected void |
updateMonitorEventAsNotified(MonitorEvent event) |
void |
updateMonitorEventAsResolved(MonitorEvent event) |
assertNotNull, buildBatchWhere, close, createSqlReplacementTokens, createSqlReplacementTokens, getJdbcTemplate, getParameterService, getSql, getSymmetricDialect, getTablePrefix, getTargetDialect, getTargetPlatform, getTargetPlatform, isCalledFromSymmetricAdminTool, isSet, isStreamClosedByClient, isSymmetricTable, logOnce, maxDate, readAcks, sendAck, setSqlMap, synchronize, toNodeIds, toNodeIdsprotected java.lang.String hostName
protected INodeService nodeService
protected IExtensionService extensionService
protected IClusterService clusterService
protected IContextService contextService
protected java.util.Map<java.lang.String,java.lang.Long> checkTimesByType
protected java.util.Map<java.lang.String,java.util.List<java.lang.Long>> averagesByType
protected java.util.List<Monitor> activeMonitorCache
protected long activeMonitorCacheTime
protected java.util.List<Notification> activeNotificationCache
protected long activeNotificationCacheTime
protected java.lang.String typeColumnName
public MonitorService(IParameterService parameterService, ISymmetricDialect symmetricDialect, INodeService nodeService, IExtensionService extensionService, IClusterService clusterService, IContextService contextService)
public void update()
update in interface IMonitorServiceprotected void updateMonitor(Monitor monitor, IMonitorType monitorType, Node identity, java.util.Map<java.lang.String,MonitorEvent> unresolved)
public java.util.List<Monitor> getMonitors()
getMonitors in interface IMonitorServicepublic java.util.List<Monitor> getActiveMonitorsForNode(java.lang.String nodeGroupId, java.lang.String externalId)
getActiveMonitorsForNode in interface IMonitorServicepublic java.util.List<Monitor> getActiveMonitorsUnresolvedForNode(java.lang.String nodeGroupId, java.lang.String externalId)
getActiveMonitorsUnresolvedForNode in interface IMonitorServicepublic void deleteMonitor(java.lang.String monitorId)
deleteMonitor in interface IMonitorServicepublic void saveMonitor(Monitor monitor)
saveMonitor in interface IMonitorServicepublic java.util.List<MonitorEvent> getMonitorEvents()
getMonitorEvents in interface IMonitorServiceprotected java.util.Map<java.lang.String,MonitorEvent> getMonitorEventsNotResolvedForNode(java.lang.String nodeId)
public java.util.List<MonitorEvent> getMonitorEventsFiltered(int limit, java.lang.String type, int severityLevel, java.lang.String nodeId, java.lang.Boolean isResolved)
getMonitorEventsFiltered in interface IMonitorServiceprotected java.util.List<MonitorEvent> getMonitorEventsForNotification(int severityLevel)
public void saveMonitorEvent(MonitorEvent event)
saveMonitorEvent in interface IMonitorServiceprotected void insertMonitorEvent(MonitorEvent event)
protected boolean updateMonitorEvent(MonitorEvent event)
public void deleteMonitorEvent(MonitorEvent event)
deleteMonitorEvent in interface IMonitorServiceprotected void updateMonitorEventAsNotified(java.util.List<MonitorEvent> events)
protected void updateMonitorEventAsNotified(MonitorEvent event)
public void updateMonitorEventAsResolved(MonitorEvent event)
updateMonitorEventAsResolved in interface IMonitorServicepublic java.util.List<Notification> getNotifications()
getNotifications in interface IMonitorServicepublic java.util.List<Notification> getActiveNotificationsForNode(java.lang.String nodeGroupId, java.lang.String externalId)
getActiveNotificationsForNode in interface IMonitorServicepublic void saveNotification(Notification notification)
saveNotification in interface IMonitorServicepublic void deleteNotification(java.lang.String notificationId)
deleteNotification in interface IMonitorServicepublic void flushMonitorCache()
flushMonitorCache in interface IMonitorServicepublic void flushNotificationCache()
flushNotificationCache in interface IMonitorService