hachikuji commented on a change in pull request #9418: URL: https://github.com/apache/kafka/pull/9418#discussion_r504344128
########## File path: raft/src/main/java/org/apache/kafka/raft/RaftClient.java ########## @@ -19,33 +19,51 @@ import org.apache.kafka.common.record.Records; import java.io.IOException; +import java.util.List; import java.util.concurrent.CompletableFuture; -public interface RaftClient { +public interface RaftClient<T> { + + interface Listener<T> { + /** + * Callback which is invoked when records written through {@link #scheduleAppend(int, List)} + * become committed. + * + * Note that there is not a one-to-one correspondence between writes through + * {@link #scheduleAppend(int, List)} and this callback. The Raft implementation + * is free to batch together the records from multiple append calls provided + * that batch boundaries are respected. This means that each batch specified + * through {@link #scheduleAppend(int, List)} is guaranteed to be a subset of + * a batch passed to {@link #handleCommit(int, long, List)}. + * + * @param epoch the epoch in which the write was accepted + * @param lastOffset the last offset of the recor Review comment: fix typo ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org