public abstract class KafkaActiveReserviorListener extends Object implements ActiveReservoirListener
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
protected Long |
maxBlockMs |
protected int |
maxRecordForLogNum |
protected int |
maxRecordSkipForLogNum |
static long |
TOPIC_AVAILABLE_TAG |
protected ConcurrentHashMap<String,Long> |
topicsIfAvailable |
| Constructor and Description |
|---|
KafkaActiveReserviorListener() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkAvailable(String topic) |
protected abstract String |
decorateTopic(String topic) |
boolean |
onRecordUpdate(List<Record> records) |
protected abstract void |
send(String topic,
Record record,
org.apache.kafka.clients.producer.Callback callback) |
protected void |
sendWrapper(String topic,
Record record,
org.apache.kafka.clients.producer.Callback callback) |
protected void |
setUnAvailable(String topic) |
protected abstract void |
tryFetchMetadataFor(String topic) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic static final long TOPIC_AVAILABLE_TAG
protected static final org.slf4j.Logger logger
protected Long maxBlockMs
protected int maxRecordForLogNum
protected int maxRecordSkipForLogNum
protected ConcurrentHashMap<String,Long> topicsIfAvailable
protected abstract void tryFetchMetadataFor(String topic)
protected abstract void send(String topic, Record record, org.apache.kafka.clients.producer.Callback callback)
protected void sendWrapper(String topic, Record record, org.apache.kafka.clients.producer.Callback callback)
public boolean onRecordUpdate(List<Record> records)
onRecordUpdate in interface ActiveReservoirListenerprotected boolean checkAvailable(String topic)
protected void setUnAvailable(String topic)
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.