Class EventForwarderQueueImpl
- java.lang.Object
-
- org.opennms.plugins.elasticsearch.rest.EventForwarderQueueImpl
-
- All Implemented Interfaces:
AutoCloseable,EventForwarder
public class EventForwarderQueueImpl extends Object implements EventForwarder, AutoCloseable
Queues events received from OpenNMS for forwarding to Elasticsearch.- Author:
- cgallen, Seth
-
-
Constructor Summary
Constructors Constructor Description EventForwarderQueueImpl(EventToIndex eventToIndex, TemplateInitializer initializer, int batchSize, int batchInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidsendNow(Event event)Asynchronously sends an event to eventd.voidsendNow(Log eventLog)Asynchronously sends a set of events to eventd.voidsendNowSync(Event event)CallAggregatingMessageProducer.dispatch(Object)to synchronously dispatch the event.voidsendNowSync(Log eventLog)CallAggregatingMessageProducer.dispatch(Object)to synchronously dispatch the events.
-
-
-
Constructor Detail
-
EventForwarderQueueImpl
public EventForwarderQueueImpl(EventToIndex eventToIndex, TemplateInitializer initializer, int batchSize, int batchInterval)
-
-
Method Detail
-
sendNow
public void sendNow(Event event)
Description copied from interface:EventForwarderAsynchronously sends an event to eventd.- Specified by:
sendNowin interfaceEventForwarder- Parameters:
event- aEventobject.
-
sendNow
public void sendNow(Log eventLog)
Description copied from interface:EventForwarderAsynchronously sends a set of events to eventd.- Specified by:
sendNowin interfaceEventForwarder- Parameters:
eventLog- aLogobject.
-
sendNowSync
public void sendNowSync(Event event)
CallAggregatingMessageProducer.dispatch(Object)to synchronously dispatch the event.- Specified by:
sendNowSyncin interfaceEventForwarder- Parameters:
event- aEventobject.
-
sendNowSync
public void sendNowSync(Log eventLog)
CallAggregatingMessageProducer.dispatch(Object)to synchronously dispatch the events.- Specified by:
sendNowSyncin interfaceEventForwarder- Parameters:
eventLog- aLogobject.
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-