Class ProcessorRecordContext
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.ProcessorRecordContext
-
- All Implemented Interfaces:
RecordContext
public class ProcessorRecordContext extends java.lang.Object implements RecordContext
-
-
Constructor Summary
Constructors Constructor Description ProcessorRecordContext(long timestamp, long offset, int partition, java.lang.String topic, org.apache.kafka.common.header.Headers headers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ProcessorRecordContextdeserialize(java.nio.ByteBuffer buffer)booleanequals(java.lang.Object o)inthashCode()Deprecated.org.apache.kafka.common.header.Headersheaders()longoffset()intpartition()longresidentMemorySizeEstimate()byte[]serialize()longtimestamp()java.lang.Stringtopic()java.lang.StringtoString()
-
-
-
Method Detail
-
offset
public long offset()
- Specified by:
offsetin interfaceRecordContext- Returns:
- The offset of the original record received from Kafka; could be -1 if it is not available
-
timestamp
public long timestamp()
- Specified by:
timestampin interfaceRecordContext- 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:
topicin interfaceRecordContext- Returns:
- The topic the record was received on; could be null if it is not available
-
partition
public int partition()
- Specified by:
partitionin interfaceRecordContext- 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:
headersin interfaceRecordContext- 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()
-
deserialize
public static ProcessorRecordContext deserialize(java.nio.ByteBuffer buffer)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
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:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-