KAFKA-10583: Add documentation on the thread-safety of KafkaAdminClient (#9397)

Other than a Stack Overflow comment (see https://stackoverflow.com/a/61738065) by Colin Patrick McCabe and a proposed design note on KIP-117 wiki, there is no source that verifies the thread-safety of KafkaAdminClient.

This patch updates JavaDoc of KafkaAdminClient to clarify its thread-safety.

Reviewers: Tom Bentley <tbentley@redhat.com>, Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Adem Efe Gencer 2020-10-19 00:53:48 -07:00 committed by GitHub
parent d841b912d1
commit d71fd8857c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -51,6 +51,9 @@ import org.apache.kafka.common.requests.LeaveGroupResponse;
* This client was introduced in 0.11.0.0 and the API is still evolving. We will try to evolve the API in a compatible
* manner, but we reserve the right to make breaking changes in minor releases, if necessary. We will update the
* {@code InterfaceStability} annotation and this notice once the API is considered stable.
* <p>
* Instances returned from the {@code create} methods of this interface are guaranteed to be thread safe.
* </p>
*/
@InterfaceStability.Evolving
public interface Admin extends AutoCloseable {

View File

@ -287,6 +287,9 @@ import static org.apache.kafka.common.utils.Utils.closeQuietly;
* The default implementation of {@link Admin}. An instance of this class is created by invoking one of the
* {@code create()} methods in {@code AdminClient}. Users should not refer to this class directly.
*
* <p>
* This class is thread-safe.
* </p>
* The API of this class is evolving, see {@link Admin} for details.
*/
@InterfaceStability.Evolving