public class AlertsEngineImpl extends Object implements AlertsEngine, PartitionTriggerListener, PartitionDataListener
AlertsService.
This implementation processes data asynchronously using a buffer queue.| Constructor and Description |
|---|
AlertsEngineImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTrigger(String tenantId,
String triggerId)
Notify AlertsEngine that a new trigger is going to be loaded.
|
void |
clear()
Reset session state.
|
ActionsService |
getActions() |
AlertsService |
getAlertsService() |
DefinitionsService |
getDefinitions() |
Trigger |
getLoadedTrigger(Trigger trigger) |
RulesEngine |
getRules() |
void |
initServices() |
void |
onNewData(Collection<Data> data)
Invoked when a new collection of Data has been received into the partition.
|
void |
onNewData(Data data)
Invoked when a new Data has been received into the partition.
|
void |
onNewEvent(Event event)
Invoked when a new Event has been received into the partition.
|
void |
onNewEvents(Collection<Event> events)
Invoked when a new collection of Events has been received into the partition.
|
void |
onPartitionChange(Map<String,List<String>> partition,
Map<String,List<String>> removed,
Map<String,List<String>> added)
Invoked when the topology has changed in the partition.
|
void |
onTriggerChange(PartitionManager.Operation operation,
String tenantId,
String triggerId)
Invoked on the node that holds the trigger when a trigger has been added, modified or removed.
|
void |
reload()
Reload all Triggers.
|
void |
reloadTrigger(String tenantId,
String triggerId)
Reload the specified Trigger.
|
void |
removeTrigger(String tenantId,
String triggerId)
Remove the specified Trigger from the engine.
|
void |
sendData(Collection<Data> data)
Send data into the alerting system for evaluation.
|
void |
sendData(Data data)
Send data into the alerting system for evaluation.
|
void |
sendEvent(Event event)
Send event into the alerting system for evaluation.
|
void |
sendEvents(Collection<Event> events)
Send event into the alerting system for evaluation.
|
void |
setActions(ActionsService actions) |
void |
setAlertsService(AlertsService alertsService) |
void |
setDefinitions(DefinitionsService definitions) |
void |
setRules(RulesEngine rules) |
void |
shutdown() |
public RulesEngine getRules()
public void setRules(RulesEngine rules)
public DefinitionsService getDefinitions()
public void setDefinitions(DefinitionsService definitions)
public ActionsService getActions()
public void setActions(ActionsService actions)
public AlertsService getAlertsService()
public void setAlertsService(AlertsService alertsService)
@PostConstruct public void initServices()
@PreDestroy public void shutdown()
public void clear()
AlertsEngineclear in interface AlertsEnginepublic void reload()
AlertsEnginereload in interface AlertsEnginepublic void addTrigger(String tenantId, String triggerId)
AlertsEngineaddTrigger in interface AlertsEnginetenantId - Tenant where Trigger is storedtriggerId - Trigger id to be reloadedpublic void reloadTrigger(String tenantId, String triggerId)
AlertsEnginereloadTrigger in interface AlertsEnginetenantId - Tenant where Trigger is storedtriggerId - Trigger id to be reloadedpublic Trigger getLoadedTrigger(Trigger trigger)
getLoadedTrigger in interface AlertsEnginetrigger - the trigger for which the loaded version is requested.public void removeTrigger(String tenantId, String triggerId)
AlertsEngineremoveTrigger in interface AlertsEnginetenantId - Tenant where Trigger is storedtriggerId - Trigger id to be removedpublic void sendData(Collection<Data> data)
AlertsEnginesendData in interface AlertsEnginedata - Not Null. The data to be evaluated by the alerting engine.public void sendData(Data data)
AlertsEnginesendData in interface AlertsEnginedata - Not Null. The data to be evaluated by the alerting engine.public void sendEvent(Event event)
AlertsEnginesendEvent in interface AlertsEngineevent - Not Null. The events to be avaluated and persisted by the alerting engine.public void sendEvents(Collection<Event> events)
AlertsEnginesendEvents in interface AlertsEngineevents - Not Null. The events to be avaluated and persisted by the alerting engine.public void onNewData(Data data)
PartitionDataListeneronNewData in interface PartitionDataListenerdata - the new data receivedpublic void onNewData(Collection<Data> data)
PartitionDataListeneronNewData in interface PartitionDataListenerdata - the new data receivedpublic void onNewEvent(Event event)
PartitionDataListeneronNewEvent in interface PartitionDataListenerevent - the new event receivedpublic void onNewEvents(Collection<Event> events)
PartitionDataListeneronNewEvents in interface PartitionDataListenerevents - the new events receivedpublic void onTriggerChange(PartitionManager.Operation operation, String tenantId, String triggerId)
PartitionTriggerListeneronTriggerChange in interface PartitionTriggerListeneroperation - the operation performed on the TriggertenantId - Tenant where Trigger is storedtriggerId - Trigger idpublic void onPartitionChange(Map<String,List<String>> partition, Map<String,List<String>> removed, Map<String,List<String>> added)
PartitionTriggerListeneronPartitionChange in interface PartitionTriggerListenerpartition - a Map with the local partition of triggers hold by this node after calculationremoved - a Map with the triggers removed from an old partition after calculationadded - a Map with the triggers added from an old partition after calculationCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.