Jess668 commented on code in PR #22729:
URL: https://github.com/apache/kafka/pull/22729#discussion_r3529862826


##########
streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyRecordIterator.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.streams.state;
+
+import org.apache.kafka.common.annotation.InterfaceStability.Evolving;
+import org.apache.kafka.streams.processor.api.ReadOnlyRecord;
+
+import java.io.Closeable;
+import java.util.Iterator;
+
+
+/**
+ * Iterator interface of {@link ReadOnlyRecord ReadOnlyRecord<K, V>}.
+ * <p>
+ * This is the result type of the headers-aware range/window/session IQv2 
query types: it yields
+ * {@link ReadOnlyRecord} elements directly, so each element carries its own 
key, value, timestamp,
+ * and headers.
+ * <p>
+ * Users must call its {@code close} method explicitly upon completeness to 
release resources,
+ * or use try-with-resources statement (available since JDK7) for this {@link 
Closeable} class.
+ * Note that {@code remove()} is not supported.
+ *
+ * @param <K> Type of keys
+ * @param <V> Type of values
+ */
+@Evolving

Review Comment:
   Thanks for looking! I don't think we can add `@InterfaceAudience.Public` 
here:
   
   - Kafka doesn't use `@InterfaceAudience` at all (grep across `clients/` and 
`streams/` main sources finds zero references).
   - `ReadOnlyRecord` is actually annotated with just `@Evolving` (not 
`@InterfaceAudience.Public` `@Evolving`).
   - `KeyValueIterator` and `WindowStoreIterator` carry no annotation at all.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to