public abstract class ConnectRecord<R extends ConnectRecord<R>>
extends java.lang.Object
Base class for records containing data to be copied to/from Kafka. This corresponds closely to
Kafka's ProducerRecord
and ConsumerRecord
classes, and holds the data that may be used by both
sources and sinks (topic, kafkaPartition, key, value). Although both implementations include a
notion of offset, it is not included here because they differ in type.
Constructor and Description |
---|
ConnectRecord(java.lang.String topic,
java.lang.Integer kafkaPartition,
Schema keySchema,
java.lang.Object key,
Schema valueSchema,
java.lang.Object value,
java.lang.Long timestamp) |
ConnectRecord(java.lang.String topic,
java.lang.Integer kafkaPartition,
Schema keySchema,
java.lang.Object key,
Schema valueSchema,
java.lang.Object value,
java.lang.Long timestamp,
java.lang.Iterable<Header> headers) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
Headers |
headers()
Get the headers for this record.
|
java.lang.Integer |
kafkaPartition() |
java.lang.Object |
key() |
Schema |
keySchema() |
abstract R |
newRecord(java.lang.String topic,
java.lang.Integer kafkaPartition,
Schema keySchema,
java.lang.Object key,
Schema valueSchema,
java.lang.Object value,
java.lang.Long timestamp)
Create a new record of the same type as itself, with the specified parameter values.
|
abstract R |
newRecord(java.lang.String topic,
java.lang.Integer kafkaPartition,
Schema keySchema,
java.lang.Object key,
Schema valueSchema,
java.lang.Object value,
java.lang.Long timestamp,
java.lang.Iterable<Header> headers)
Create a new record of the same type as itself, with the specified parameter values.
|
java.lang.Long |
timestamp() |
java.lang.String |
topic() |
java.lang.String |
toString() |
java.lang.Object |
value() |
Schema |
valueSchema() |
public ConnectRecord(java.lang.String topic, java.lang.Integer kafkaPartition, Schema keySchema, java.lang.Object key, Schema valueSchema, java.lang.Object value, java.lang.Long timestamp)
public java.lang.String topic()
public java.lang.Integer kafkaPartition()
public java.lang.Object key()
public Schema keySchema()
public java.lang.Object value()
public Schema valueSchema()
public java.lang.Long timestamp()
public Headers headers()
public abstract R newRecord(java.lang.String topic, java.lang.Integer kafkaPartition, Schema keySchema, java.lang.Object key, Schema valueSchema, java.lang.Object value, java.lang.Long timestamp)
topic
- the name of the topic; may be nullkafkaPartition
- the partition number for the Kafka topic; may be nullkeySchema
- the schema for the key; may be nullkey
- the key; may be nullvalueSchema
- the schema for the value; may be nullvalue
- the value; may be nulltimestamp
- the timestamp; may be nullpublic abstract R newRecord(java.lang.String topic, java.lang.Integer kafkaPartition, Schema keySchema, java.lang.Object key, Schema valueSchema, java.lang.Object value, java.lang.Long timestamp, java.lang.Iterable<Header> headers)
topic
- the name of the topic; may be nullkafkaPartition
- the partition number for the Kafka topic; may be nullkeySchema
- the schema for the key; may be nullkey
- the key; may be nullvalueSchema
- the schema for the value; may be nullvalue
- the value; may be nulltimestamp
- the timestamp; may be nullheaders
- the headers; may be null or emptypublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object