| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_OFFER_WAIT_MS
The default number of milliseconds to wait when offering new events to the queue.
|
private BlockingQueue<E> |
events |
private ComponentLog |
logger |
private long |
offerWaitMs |
| Constructor and Description |
|---|
EventQueue(BlockingQueue<E> events,
ComponentLog logger) |
EventQueue(BlockingQueue<E> events,
long offerWaitMs,
ComponentLog logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
offer(E event)
Offers the given event to the events queue with a wait time, if the offer fails the event
is dropped an error is logged.
|
public static final long DEFAULT_OFFER_WAIT_MS
private final long offerWaitMs
private final BlockingQueue<E extends Event> events
private final ComponentLog logger
public EventQueue(BlockingQueue<E> events, ComponentLog logger)
public EventQueue(BlockingQueue<E> events, long offerWaitMs, ComponentLog logger)
public void offer(E event) throws InterruptedException
event - the event to offerInterruptedException - if interrupted while waiting to offerCopyright © 2019 Apache NiFi Project. All rights reserved.