Interface RecordCollector
-
- All Known Implementing Classes:
RecordCollectorImpl
public interface RecordCollector
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RecordCollector.Supplier
A supplier of aRecordCollectorImpl
instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeClean()
Clean close the internalProducer
.void
closeDirty()
Dirty close the internalProducer
.void
flush()
Flush the internalProducer
.void
initialize()
Initialize the internalProducer
; note this function should be made idempotentMap<TopicPartition,Long>
offsets()
The last acked offsets from the internalProducer
.<K,V>
voidsend(String topic, K key, V value, Headers headers, Integer partition, Long timestamp, Serializer<K> keySerializer, Serializer<V> valueSerializer)
<K,V>
voidsend(String topic, K key, V value, Headers headers, Long timestamp, Serializer<K> keySerializer, Serializer<V> valueSerializer, StreamPartitioner<? super K,? super V> partitioner)
-
-
-
Method Detail
-
send
<K,V> void send(String topic, K key, V value, Headers headers, Integer partition, Long timestamp, Serializer<K> keySerializer, Serializer<V> valueSerializer)
-
send
<K,V> void send(String topic, K key, V value, Headers headers, Long timestamp, Serializer<K> keySerializer, Serializer<V> valueSerializer, StreamPartitioner<? super K,? super V> partitioner)
-
initialize
void initialize()
Initialize the internalProducer
; note this function should be made idempotent- Throws:
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
Map<TopicPartition,Long> offsets()
The last acked offsets from the internalProducer
.- Returns:
- an immutable map from TopicPartition to offset
-
-