Description
KafkaFuture.Function is currently an empty public abstract class.
This means you cannot implement them as a java lambda. And you end up with constructs as:
new KafkaFuture.Function<Set<String>, Object>() { @Override public Object apply(Set<String> strings) { return foo; } }
I propose to define them as interfaces.
So this code can become in java 8:
strings -> foo
I know this change is backwards incompatible (extends becomes implements).
But as KafkaFuture is marked as @InterfaceStability.Evolving.
And KafkaFuture states in its javadoc:
This will eventually become a thin shim on top of Java 8's CompletableFuture.
I think this change might be worth considering.
Attachments
Issue Links
- links to