Class RecordCollectorImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void closeClean()
      Clean close the internal Producer.
      void closeDirty()
      Dirty close the internal Producer.
      void flush()
      Flush the internal Producer.
      void initialize()
      Initialize the internal Producer; note this function should be made idempotent
      java.util.Map<org.apache.kafka.common.TopicPartition,​java.lang.Long> offsets()
      The last acked offsets from the internal Producer.
      <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)  
      <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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • initialize

        public void initialize()
        Description copied from interface: RecordCollector
        Initialize the internal Producer; note this function should be made idempotent
        Specified by:
        initialize in interface RecordCollector
      • send

        public <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)
        Specified by:
        send in interface RecordCollector
        Throws:
        StreamsException - fatal error that should cause the thread to die
        TaskMigratedException - recoverable error that would cause the task to be removed
      • send

        public <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)
        Specified by:
        send in interface RecordCollector
      • offsets

        public java.util.Map<org.apache.kafka.common.TopicPartition,​java.lang.Long> offsets()
        Description copied from interface: RecordCollector
        The last acked offsets from the internal Producer.
        Specified by:
        offsets in interface RecordCollector
        Returns:
        an immutable map from TopicPartition to offset