Class ProcessorRecordContext

    • Constructor Summary

      Constructors 
      Constructor Description
      ProcessorRecordContext​(long timestamp, long offset, int partition, java.lang.String topic)  
      ProcessorRecordContext​(long timestamp, long offset, int partition, java.lang.String topic, org.apache.kafka.common.header.Headers headers)  
    • Constructor Detail

      • ProcessorRecordContext

        public ProcessorRecordContext​(long timestamp,
                                      long offset,
                                      int partition,
                                      java.lang.String topic,
                                      org.apache.kafka.common.header.Headers headers)
      • ProcessorRecordContext

        public ProcessorRecordContext​(long timestamp,
                                      long offset,
                                      int partition,
                                      java.lang.String topic)
    • Method Detail

      • setTimestamp

        public void setTimestamp​(long timestamp)
      • offset

        public long offset()
        Specified by:
        offset in interface RecordContext
        Returns:
        The offset of the original record received from Kafka; could be -1 if it is not available
      • timestamp

        public long timestamp()
        Specified by:
        timestamp in interface RecordContext
        Returns:
        The timestamp extracted from the record received from Kafka; could be -1 if it is not available
      • topic

        public java.lang.String topic()
        Specified by:
        topic in interface RecordContext
        Returns:
        The topic the record was received on; could be null if it is not available
      • partition

        public int partition()
        Specified by:
        partition in interface RecordContext
        Returns:
        The partition the record was received on; could be -1 if it is not available
      • headers

        public org.apache.kafka.common.header.Headers headers()
        Specified by:
        headers in interface RecordContext
        Returns:
        The headers from the record received from Kafka; could be null if it is not available
      • sizeBytes

        public long sizeBytes()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object