Class KafkaAbstractSource.KafkaRecord<V>

  • All Implemented Interfaces:
    org.apache.pulsar.functions.api.Record<V>
    Direct Known Subclasses:
    KafkaAbstractSource.KeyValueKafkaRecord
    Enclosing class:
    KafkaAbstractSource<V>

    protected static class KafkaAbstractSource.KafkaRecord<V>
    extends java.lang.Object
    implements org.apache.pulsar.functions.api.Record<V>
    • Constructor Summary

      Constructors 
      Constructor Description
      KafkaRecord​(org.apache.kafka.clients.consumer.ConsumerRecord<java.lang.String,​?> record, V value, org.apache.pulsar.client.api.Schema<V> schema)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void ack()  
      java.util.Optional<java.lang.String> getKey()  
      java.util.Optional<java.lang.String> getPartitionId()  
      java.util.Optional<java.lang.Integer> getPartitionIndex()  
      java.util.Optional<java.lang.Long> getRecordSequence()  
      org.apache.pulsar.client.api.Schema<V> getSchema()  
      V getValue()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.pulsar.functions.api.Record

        fail, getDestinationTopic, getEventTime, getMessage, getProperties, getTopicName
    • Constructor Detail

      • KafkaRecord

        public KafkaRecord​(org.apache.kafka.clients.consumer.ConsumerRecord<java.lang.String,​?> record,
                           V value,
                           org.apache.pulsar.client.api.Schema<V> schema)
    • Method Detail

      • getPartitionId

        public java.util.Optional<java.lang.String> getPartitionId()
        Specified by:
        getPartitionId in interface org.apache.pulsar.functions.api.Record<V>
      • getPartitionIndex

        public java.util.Optional<java.lang.Integer> getPartitionIndex()
        Specified by:
        getPartitionIndex in interface org.apache.pulsar.functions.api.Record<V>
      • getRecordSequence

        public java.util.Optional<java.lang.Long> getRecordSequence()
        Specified by:
        getRecordSequence in interface org.apache.pulsar.functions.api.Record<V>
      • getKey

        public java.util.Optional<java.lang.String> getKey()
        Specified by:
        getKey in interface org.apache.pulsar.functions.api.Record<V>
      • getValue

        public V getValue()
        Specified by:
        getValue in interface org.apache.pulsar.functions.api.Record<V>
      • ack

        public void ack()
        Specified by:
        ack in interface org.apache.pulsar.functions.api.Record<V>
      • getSchema

        public org.apache.pulsar.client.api.Schema<V> getSchema()
        Specified by:
        getSchema in interface org.apache.pulsar.functions.api.Record<V>