Class ProcessorRecordContext

    • Constructor Detail

      • ProcessorRecordContext

        public ProcessorRecordContext​(long timestamp,
                                      long offset,
                                      int partition,
                                      String topic,
                                      Headers headers)
    • Method Detail

      • 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 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 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
      • residentMemorySizeEstimate

        public long residentMemorySizeEstimate()
      • serialize

        public byte[] serialize()
      • hashCode

        @Deprecated
        public int hashCode()
        Deprecated.
        Equality is implemented in support of tests, *not* for use in Hash collections, since this class is mutable.
        Overrides:
        hashCode in class Object