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)
ProcessorRecordContext(long timestamp, long offset, int partition, java.lang.String topic, org.apache.kafka.common.header.Headers headers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
org.apache.kafka.common.header.Headers
headers()
long
offset()
int
partition()
void
setTimestamp(long timestamp)
long
sizeBytes()
long
timestamp()
java.lang.String
topic()
-
-
-
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 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 java.lang.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 org.apache.kafka.common.header.Headers headers()
- Specified by:
headers
in interfaceRecordContext
- 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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-