Class EventProcessor<T>
java.lang.Object
org.apache.kafka.clients.consumer.internals.events.EventProcessor<T>
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
ApplicationEventProcessor
An
EventProcessor is the means by which events produced by thread A are
processed by thread B. By definition, threads A and B run in parallel to
each other, so a mechanism is needed with which to receive and process the events from the other thread. That
communication channel is formed around a shared queue into which thread A
enqueues events and thread B reads and processes those events.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEventProcessor(org.apache.kafka.common.utils.LogContext logContext, BlockingQueue<T> eventQueue) -
Method Summary
-
Constructor Details
-
EventProcessor
protected EventProcessor(org.apache.kafka.common.utils.LogContext logContext, BlockingQueue<T> eventQueue)
-
-
Method Details
-
process
public abstract boolean process() -
process
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
process
Drains all available events from the queue, and then processes them in order. If any errors are thrown while processing the individual events, these are submitted to the givenEventProcessor.ProcessHandler.
-