public class AlertServiceImpl extends PersistedServiceImpl implements AlertService
mongoConnection
Constructor and Description |
---|
AlertServiceImpl(MongoConnection mongoConnection,
FieldValueAlertCondition.Factory fieldValueAlertFactory,
MessageCountAlertCondition.Factory messageCountAlertFactory) |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
asMap(AlertCondition alertCondition) |
Alert |
factory(AlertCondition.CheckResult checkResult) |
AlertCondition |
fromPersisted(Map<String,Object> fields,
Stream stream) |
AbstractAlertCondition |
fromRequest(CreateConditionRequest ccr,
Stream stream,
String userId) |
boolean |
inGracePeriod(AlertCondition alertCondition) |
List<Alert> |
loadRecentOfStream(String streamId,
org.joda.time.DateTime since) |
long |
totalCount() |
long |
totalCountForStream(String streamId) |
AlertCondition.CheckResult |
triggered(AlertCondition alertCondition) |
AlertCondition.CheckResult |
triggeredNoGrace(AlertCondition alertCondition) |
int |
triggeredSecondsAgo(String streamId,
String conditionId) |
AbstractAlertCondition |
updateFromRequest(AlertCondition alertCondition,
CreateConditionRequest ccr) |
collection, collection, count, count, cursorToList, destroy, destroy, destroyAll, destroyAll, destroyAll, embed, findOne, findOne, findOne, findOne, get, get, get, query, query, query, query, query, removeEmbedded, removeEmbedded, save, saveWithoutValidation, totalCount, totalCount, validate, validate, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, destroyAll, save, saveWithoutValidation, validate, validate, validate
@Inject public AlertServiceImpl(MongoConnection mongoConnection, FieldValueAlertCondition.Factory fieldValueAlertFactory, MessageCountAlertCondition.Factory messageCountAlertFactory)
public Alert factory(AlertCondition.CheckResult checkResult)
factory
in interface AlertService
public List<Alert> loadRecentOfStream(String streamId, org.joda.time.DateTime since)
loadRecentOfStream
in interface AlertService
public int triggeredSecondsAgo(String streamId, String conditionId)
triggeredSecondsAgo
in interface AlertService
public long totalCount()
totalCount
in interface AlertService
public long totalCountForStream(String streamId)
totalCountForStream
in interface AlertService
public AlertCondition fromPersisted(Map<String,Object> fields, Stream stream) throws AbstractAlertCondition.NoSuchAlertConditionTypeException
fromPersisted
in interface AlertService
AbstractAlertCondition.NoSuchAlertConditionTypeException
public AbstractAlertCondition fromRequest(CreateConditionRequest ccr, Stream stream, String userId) throws AbstractAlertCondition.NoSuchAlertConditionTypeException
fromRequest
in interface AlertService
AbstractAlertCondition.NoSuchAlertConditionTypeException
public AbstractAlertCondition updateFromRequest(AlertCondition alertCondition, CreateConditionRequest ccr) throws AbstractAlertCondition.NoSuchAlertConditionTypeException
updateFromRequest
in interface AlertService
AbstractAlertCondition.NoSuchAlertConditionTypeException
public boolean inGracePeriod(AlertCondition alertCondition)
inGracePeriod
in interface AlertService
public AlertCondition.CheckResult triggeredNoGrace(AlertCondition alertCondition)
triggeredNoGrace
in interface AlertService
public AlertCondition.CheckResult triggered(AlertCondition alertCondition)
triggered
in interface AlertService
public Map<String,Object> asMap(AlertCondition alertCondition)
asMap
in interface AlertService
Copyright © 2012-2015 Graylog, Inc.. All Rights Reserved.