public class OpennmsKafkaProducer extends Object implements AlarmLifecycleListener, EventListener
| Modifier and Type | Field and Description |
|---|---|
static String |
KAFKA_CLIENT_PID |
| Constructor and Description |
|---|
OpennmsKafkaProducer(ProtobufMapper protobufMapper,
NodeCache nodeCache,
org.osgi.service.cm.ConfigurationAdmin configAdmin,
EventSubscriptionService eventSubscriptionService) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
CountDownLatch |
getAlarmForwardedLatch() |
CountDownLatch |
getEventForwardedLatch() |
String |
getName()
Return the id of the listener
|
CountDownLatch |
getNodeForwardedLatch() |
void |
handleAlarmSnapshot(List<OnmsAlarm> alarms) |
void |
handleDeletedAlarm(int alarmId,
String reductionKey) |
void |
handleDeletedAlarm(String reductionKey) |
void |
handleNewOrUpdatedAlarm(OnmsAlarm alarm) |
void |
init() |
boolean |
isForwardingAlarms() |
void |
onEvent(Event event)
Process a sent event.
|
void |
setAlarmFilter(String alarmFilter) |
void |
setAlarmTopic(String alarmTopic) |
OpennmsKafkaProducer |
setDataSync(KafkaAlarmDataSync dataSync) |
void |
setEventFilter(String eventFilter) |
void |
setEventTopic(String eventTopic) |
void |
setKafkaSendQueueCapacity(int kafkaSendQueueCapacity) |
void |
setNodeTopic(String nodeTopic) |
void |
setSuppressIncrementalAlarms(boolean suppressIncrementalAlarms) |
boolean |
shouldForwardAlarm(OnmsAlarm alarm) |
public static final String KAFKA_CLIENT_PID
public OpennmsKafkaProducer(ProtobufMapper protobufMapper, NodeCache nodeCache, org.osgi.service.cm.ConfigurationAdmin configAdmin, EventSubscriptionService eventSubscriptionService)
public void init()
throws IOException
IOExceptionpublic void destroy()
public boolean shouldForwardAlarm(OnmsAlarm alarm)
public void handleAlarmSnapshot(List<OnmsAlarm> alarms)
handleAlarmSnapshot in interface AlarmLifecycleListenerpublic void handleNewOrUpdatedAlarm(OnmsAlarm alarm)
handleNewOrUpdatedAlarm in interface AlarmLifecycleListenerpublic void handleDeletedAlarm(int alarmId,
String reductionKey)
handleDeletedAlarm in interface AlarmLifecycleListenerpublic void handleDeletedAlarm(String reductionKey)
public String getName()
EventListenergetName in interface EventListenerString object.public void onEvent(Event event)
EventListeneronEvent in interface EventListenerevent - a Event object.public void setEventTopic(String eventTopic)
public void setAlarmTopic(String alarmTopic)
public void setNodeTopic(String nodeTopic)
public void setEventFilter(String eventFilter)
public void setAlarmFilter(String alarmFilter)
public OpennmsKafkaProducer setDataSync(KafkaAlarmDataSync dataSync)
public boolean isForwardingAlarms()
public CountDownLatch getEventForwardedLatch()
public CountDownLatch getAlarmForwardedLatch()
public CountDownLatch getNodeForwardedLatch()
public void setSuppressIncrementalAlarms(boolean suppressIncrementalAlarms)
public void setKafkaSendQueueCapacity(int kafkaSendQueueCapacity)
Copyright © 2018. All rights reserved.