Current state: Under Discussion
Discussion thread: here
JIRA: KAFKA-13285
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
This KIP is a 3rd attempt to bring consistency and testability to the Admin client's *Result
classes. It follows two KIPs which were not accepted:
Admin
instances.The proposal this time is to establish the following convention/pattern for the instantiation of Result classes:
public
access initially.public static
factory methods for API evolution that cannot use overloading (for example if an API change requires changing the type arguments of an existing constructor parameter, which would be impossible to do via constructor overloading while retaining compatibility because the erased signatures of the old and new constructors would be the same).It is also proposed to:
final
modifier from ElectLeadersResult
to improve consistency.KafkaFuture.failedFuture(Throwable)
method for creating failed futures without needing to use the private KafkaFutureImpl class (KafkaFuture
already has a static succeededFuture(T)
method).protected
constructors of *Result
classes in the Admin
client to public
.final
modifiers on those classesKafkaFuture.failedFuture(Throwable)
/** * Returns a new KafkaFuture that is already failed with the given exception. */ public static <U> KafkaFuture<U> failedFuture(Throwable cause) |
Per public interfaces section.
This change is source and binary compatible with previous releases.