darenwkt commented on code in PR #39: URL: https://github.com/apache/flink-connector-aws/pull/39#discussion_r1058985956
########## flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/KinesisProxyAsyncV2Interface.java: ########## @@ -0,0 +1,41 @@ +/* + * 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.flink.streaming.connectors.kinesis.proxy; + +import org.apache.flink.annotation.Internal; + +import software.amazon.awssdk.services.kinesis.model.SubscribeToShardRequest; +import software.amazon.awssdk.services.kinesis.model.SubscribeToShardResponseHandler; + +import java.util.concurrent.CompletableFuture; + +/** + * Interface for a Kinesis proxy using AWS SDK v2.x operating on multiple Kinesis streams within the + * same AWS service region. + */ +@Internal +public interface KinesisProxyAsyncV2Interface { + + CompletableFuture<Void> subscribeToShard( + SubscribeToShardRequest request, SubscribeToShardResponseHandler responseHandler); + + /** Destroy any open resources used by the factory. */ + default void close() { Review Comment: In the implementation (i.e KinesisProxyAsyncV2.java), close() is overriden and used to close any open HttpClient gracefully. I think it's ok to put as default for cases that do not require closing any resources. But do let me know if you think I should remove the default so that any implementation have to explicitly implement it. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org