public class BlockingEventQueue<T> extends Object
QueueProcessor
where the events will get emitted to kafka.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
private int |
maxBatchSize |
private Duration |
pollInterval |
private BlockingQueue |
queue |
private static int |
SLEEP_MS |
| Constructor and Description |
|---|
BlockingEventQueue(Duration pollInterval,
int maxQueueSize,
int maxBatchSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
enqueue(T event) |
boolean |
isEmpty() |
List<T> |
poll() |
int |
size() |
private static final org.slf4j.Logger LOGGER
private static final int SLEEP_MS
private final Duration pollInterval
private final int maxBatchSize
private final BlockingQueue queue
public BlockingEventQueue(Duration pollInterval, int maxQueueSize, int maxBatchSize)
public void enqueue(T event)
public List<T> poll() throws InterruptedException
InterruptedExceptionpublic boolean isEmpty()
public int size()
Copyright © 2019 JBoss by Red Hat. All rights reserved.