Class EventForwarderQueueImpl
- java.lang.Object
-
- org.opennms.plugins.elasticsearch.rest.EventForwarderQueueImpl
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,EventForwarder
public class EventForwarderQueueImpl extends java.lang.Object implements EventForwarder, java.lang.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 void
close()
void
sendNow(Event event)
Asynchronously sends an event to eventd.void
sendNow(Log eventLog)
Asynchronously sends a set of events to eventd.void
sendNowSync(Event event)
CallAggregatingMessageProducer.dispatch(Object)
to synchronously dispatch the event.void
sendNowSync(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:EventForwarder
Asynchronously sends an event to eventd.- Specified by:
sendNow
in interfaceEventForwarder
- Parameters:
event
- aEvent
object.
-
sendNow
public void sendNow(Log eventLog)
Description copied from interface:EventForwarder
Asynchronously sends a set of events to eventd.- Specified by:
sendNow
in interfaceEventForwarder
- Parameters:
eventLog
- aLog
object.
-
sendNowSync
public void sendNowSync(Event event)
CallAggregatingMessageProducer.dispatch(Object)
to synchronously dispatch the event.- Specified by:
sendNowSync
in interfaceEventForwarder
- Parameters:
event
- aEvent
object.
-
sendNowSync
public void sendNowSync(Log eventLog)
CallAggregatingMessageProducer.dispatch(Object)
to synchronously dispatch the events.- Specified by:
sendNowSync
in interfaceEventForwarder
- Parameters:
eventLog
- aLog
object.
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
-