kirktrue commented on code in PR #19467: URL: https://github.com/apache/kafka/pull/19467#discussion_r2047085428
########## clients/src/main/java/org/apache/kafka/common/serialization/Serializer.java: ########## @@ -23,20 +23,25 @@ /** * An interface for converting objects to bytes. - * * A class that implements this interface is expected to have a constructor with no parameter. - * <p> - * Implement {@link org.apache.kafka.common.ClusterResourceListener} to receive cluster metadata once it's available. Please see the class documentation for ClusterResourceListener for more information. - * Implement {@link org.apache.kafka.common.metrics.Monitorable} to enable the serializer to register metrics. The following tags ae automatically added to - * all metrics registered: <code>config</code> set to either <code>key.serializer</code> or <code>value.serializer</code>, and <code>class</code> set to the Serializer class name. + * + * <p>This interface can be combined with {@link org.apache.kafka.common.ClusterResourceListener ClusterResourceListener} + * to receive cluster metadata once it's available, as well as {@link org.apache.kafka.common.metrics.Monitorable Monitorable} + * to enable the serializer to register metrics. For the later case, the following tags are automatically added to all Review Comment: ```suggestion * to enable the serializer to register metrics. For the latter case, the following tags are automatically added to all ``` ########## clients/src/main/java/org/apache/kafka/common/serialization/Deserializer.java: ########## @@ -25,39 +25,61 @@ /** * An interface for converting bytes to objects. - * * A class that implements this interface is expected to have a constructor with no parameters. - * <p> - * Implement {@link org.apache.kafka.common.ClusterResourceListener} to receive cluster metadata once it's available. Please see the class documentation for ClusterResourceListener for more information. - * Implement {@link org.apache.kafka.common.metrics.Monitorable} to enable the deserializer to register metrics. The following tags are automatically added to - * all metrics registered: <code>config</code> set to either <code>key.deserializer</code> or <code>value.deserializer</code>, and <code>class</code> set to the Deserializer class name. + * + * <p>This interface can be combined with {@link org.apache.kafka.common.ClusterResourceListener ClusterResourceListener} + * to receive cluster metadata once it's available, as well as {@link org.apache.kafka.common.metrics.Monitorable Monitorable} + * to enable the deserializer to register metrics. For the later case, the following tags are automatically added to + * all metrics registered: {@code config} set to either {@code key.deserializer} or {@code value.deserializer}, + * and {@code class} set to the deserializer class name. + * * @param <T> Type to be deserialized into. */ public interface Deserializer<T> extends Closeable { /** * Configure this class. - * @param configs configs in key/value pairs - * @param isKey whether is for key or value + * + * @param configs + * configs in key/value pairs + * @param isKey + * whether is for key or value Review Comment: Excuse my ignorance, but whether _what_ is for the key or value? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org