Interface RecordCollector
-
- All Known Implementing Classes:
RecordCollectorImpl
public interface RecordCollector
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceRecordCollector.SupplierA supplier of aRecordCollectorImplinstance.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseClean()Clean close the internalProducer.voidcloseDirty()Dirty close the internalProducer.voidflush()Flush the internalProducer.voidinitialize()Initialize the internalProducer; note this function should be made idempotentjava.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long>offsets()The last acked offsets from the internalProducer.<K,V>
voidsend(java.lang.String topic, K key, V value, org.apache.kafka.common.header.Headers headers, java.lang.Integer partition, java.lang.Long timestamp, org.apache.kafka.common.serialization.Serializer<K> keySerializer, org.apache.kafka.common.serialization.Serializer<V> valueSerializer)<K,V>
voidsend(java.lang.String topic, K key, V value, org.apache.kafka.common.header.Headers headers, java.lang.Long timestamp, org.apache.kafka.common.serialization.Serializer<K> keySerializer, org.apache.kafka.common.serialization.Serializer<V> valueSerializer, StreamPartitioner<? super K,? super V> partitioner)
-
-
-
Method Detail
-
send
<K,V> void send(java.lang.String topic, K key, V value, org.apache.kafka.common.header.Headers headers, java.lang.Integer partition, java.lang.Long timestamp, org.apache.kafka.common.serialization.Serializer<K> keySerializer, org.apache.kafka.common.serialization.Serializer<V> valueSerializer)
-
send
<K,V> void send(java.lang.String topic, K key, V value, org.apache.kafka.common.header.Headers headers, java.lang.Long timestamp, org.apache.kafka.common.serialization.Serializer<K> keySerializer, org.apache.kafka.common.serialization.Serializer<V> valueSerializer, StreamPartitioner<? super K,? super V> partitioner)
-
initialize
void initialize()
Initialize the internalProducer; note this function should be made idempotent- Throws:
org.apache.kafka.common.errors.TimeoutException- if producer initializing txn id timed out
-
flush
void flush()
Flush the internalProducer.
-
closeClean
void closeClean()
Clean close the internalProducer.
-
closeDirty
void closeDirty()
Dirty close the internalProducer.
-
offsets
java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long> offsets()
The last acked offsets from the internalProducer.- Returns:
- an immutable map from TopicPartition to offset
-
-