chia7712 commented on code in PR #21337: URL: https://github.com/apache/kafka/pull/21337#discussion_r3574009798
########## streams/src/main/java/org/apache/kafka/streams/CloseOptions.java: ########## @@ -14,12 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.kafka.streams; +import org.apache.kafka.common.annotation.InterfaceAudience; + import java.time.Duration; import java.util.Objects; import java.util.Optional; [email protected] Review Comment: @omkreddy @ashwinpankaj Pardon me, have we discussed the design of `CloseOptions`? It assumes the 'protected' methods are not part of the Public API, but `@InterfaceAudience.Public` states that they are. I think the best practice per KIP-1265 is to move `CloseOptionsInternal` to be a nested class of `CloseOptions` and mark it with `@InterfaceAudience.Private`. Also, all members of `CloseOptions` will be changed from `protected` to `private` ```java @InterfaceAudience.Public public class CloseOptions { /** * this class is NOT public */ @InterfaceAudience.Private public static class Internal extends CloseOptions { public Internal(final CloseOptions options) { super(options); } public GroupMembershipOperation operation() { return super.operation; } public Optional<Duration> timeout() { return super.timeout; } } ``` WDYT? -- 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]
