public class RecordMetadata extends Object
Constructor and Description |
---|
RecordMetadata()
Constructor
|
RecordMetadata(JsonObject json)
Constructor (from JSON representation)
|
RecordMetadata(long offset,
int partition,
long timestamp,
String topic)
Constructor
|
Modifier and Type | Method and Description |
---|---|
long |
getOffset() |
int |
getPartition() |
long |
getTimestamp() |
String |
getTopic() |
RecordMetadata |
setOffset(long offset)
Set the offset of the record in the topic/partition.
|
RecordMetadata |
setPartition(int partition)
Set the partition the record was sent to
|
RecordMetadata |
setTimestamp(long timestamp)
Set the timestamp of the record in the topic/partition
|
RecordMetadata |
setTopic(String topic)
Set the topic the record was appended to
|
JsonObject |
toJson()
Convert object to JSON representation
|
public RecordMetadata()
public RecordMetadata(long offset, int partition, long timestamp, String topic)
offset
- the offset of the record in the topic/partition.partition
- the partition the record was sent totimestamp
- the timestamp of the record in the topic/partitiontopic
- the topic the record was appended topublic RecordMetadata(JsonObject json)
json
- JSON representationpublic long getOffset()
public RecordMetadata setOffset(long offset)
offset
- offset of the record in the topic/partitionpublic int getPartition()
public RecordMetadata setPartition(int partition)
partition
- the partition the record was sent topublic long getTimestamp()
public RecordMetadata setTimestamp(long timestamp)
timestamp
- the timestamp of the record in the topic/partitionpublic String getTopic()
public RecordMetadata setTopic(String topic)
topic
- the topic the record was appended topublic JsonObject toJson()
Copyright © 2024 Eclipse. All rights reserved.