Class ProcessorRecordContext
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.ProcessorRecordContext
-
- All Implemented Interfaces:
RecordContext
public class ProcessorRecordContext extends Object implements RecordContext
-
-
Constructor Summary
Constructors Constructor Description ProcessorRecordContext(long timestamp, long offset, int partition, String topic, Headers headers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ProcessorRecordContext
deserialize(ByteBuffer buffer)
boolean
equals(Object o)
int
hashCode()
Deprecated.Headers
headers()
long
offset()
int
partition()
long
residentMemorySizeEstimate()
byte[]
serialize()
long
timestamp()
String
topic()
String
toString()
-
-
-
Method Detail
-
offset
public long offset()
- Specified by:
offset
in 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:
timestamp
in interfaceRecordContext
- 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 interfaceRecordContext
- Returns:
- The topic the record was received on; could be null if it is not available
-
partition
public int partition()
- Specified by:
partition
in interfaceRecordContext
- Returns:
- The partition the record was received on; could be -1 if it is not available
-
headers
public Headers headers()
- Specified by:
headers
in 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(ByteBuffer buffer)
-
hashCode
@Deprecated public int hashCode()
Deprecated.Equality is implemented in support of tests, *not* for use in Hash collections, since this class is mutable.
-
-