public class AlertServiceImpl extends Object implements AlertService
| Constructor and Description |
|---|
AlertServiceImpl(MongoConnection mongoConnection,
MongoJackObjectMapperProvider mapperProvider,
AlertConditionFactory alertConditionFactory,
AlarmCallbackHistoryService alarmCallbackHistoryService) |
@Inject public AlertServiceImpl(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapperProvider, AlertConditionFactory alertConditionFactory, AlarmCallbackHistoryService alarmCallbackHistoryService)
public Alert factory(AlertCondition.CheckResult checkResult)
factory in interface AlertServicepublic List<Alert> loadRecentOfStreams(List<String> streamIds, org.joda.time.DateTime since, int limit)
loadRecentOfStreams in interface AlertServicepublic List<Alert> loadRecentOfStream(String streamId, org.joda.time.DateTime since, int limit)
loadRecentOfStream in interface AlertServicepublic Optional<Alert> getLastTriggeredAlert(String streamId, String conditionId)
getLastTriggeredAlert in interface AlertServicepublic long totalCount()
totalCount in interface AlertServicepublic long totalCountForStream(String streamId)
totalCountForStream in interface AlertServicepublic long totalCountForStreams(List<String> streamIds, Alert.AlertState state)
totalCountForStreams in interface AlertServicepublic AlertCondition fromPersisted(Map<String,Object> fields, Stream stream) throws ConfigurationException
fromPersisted in interface AlertServiceConfigurationExceptionpublic AlertCondition fromRequest(CreateConditionRequest ccr, Stream stream, String userId) throws ConfigurationException
fromRequest in interface AlertServiceConfigurationExceptionpublic AlertCondition updateFromRequest(AlertCondition alertCondition, CreateConditionRequest ccr) throws ConfigurationException
updateFromRequest in interface AlertServiceConfigurationExceptionpublic boolean inGracePeriod(AlertCondition alertCondition)
inGracePeriod in interface AlertServicepublic boolean shouldRepeatNotifications(AlertCondition alertCondition, Alert alert)
shouldRepeatNotifications in interface AlertServicepublic List<Alert> listForStreamIds(List<String> streamIds, Alert.AlertState state, int skip, int limit)
listForStreamIds in interface AlertServicepublic List<Alert> listForStreamId(String streamId, int skip, int limit)
listForStreamId in interface AlertServicepublic Alert load(String alertId, String streamId) throws NotFoundException
load in interface AlertServiceNotFoundExceptionpublic String save(Alert alert) throws ValidationException
save in interface AlertServiceValidationExceptionpublic Alert resolveAlert(Alert alert)
resolveAlert in interface AlertServicepublic boolean isResolved(Alert alert)
isResolved in interface AlertServiceCopyright © 2012–2021 Graylog, Inc.. All rights reserved.