Record Class TopicPartitionKey
java.lang.Object
java.lang.Record
io.smallrye.reactive.messaging.kafka.TopicPartitionKey
-
Constructor Summary
ConstructorsConstructorDescriptionTopicPartitionKey(org.apache.kafka.common.TopicPartition topicPartition, Object key) Creates an instance of aTopicPartitionKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.static TopicPartitionKeystatic TopicPartitionKeyofKey(org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record) static TopicPartitionKeyofPartition(String topic, int partition) static TopicPartitionKeyofPartition(org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record) org.apache.kafka.common.TopicPartitionReturns the value of thetopicPartitionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TopicPartitionKey
Creates an instance of aTopicPartitionKeyrecord class.- Parameters:
topicPartition- the value for thetopicPartitionrecord componentkey- the value for thekeyrecord component
-
-
Method Details
-
ofKey
-
ofKey
-
ofPartition
-
ofPartition
public static TopicPartitionKey ofPartition(org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
topicPartition
public org.apache.kafka.common.TopicPartition topicPartition()Returns the value of thetopicPartitionrecord component.- Returns:
- the value of the
topicPartitionrecord component
-
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-