class KafkaRaftClient implements RaftClient {

    private LogAppendInfo appendAsLeader(
        LeaderState state,
        Records records,
        long currentTimeMs
    ) {
        LogAppendInfo info = log.appendAsLeader(records, quorum.epoch());
        OffsetAndEpoch endOffset = endOffset();
        updateLeaderEndOffsetAndTimestamp(state, currentTimeMs);
        kafkaRaftMetrics.updateAppendRecords(info.lastOffset - info.firstOffset + 1);
        kafkaRaftMetrics.updateLogEnd(endOffset);
        logger.trace("Leader appended records at base offset {}, new end offset is {}", info.firstOffset, endOffset);
        return info;
    }

    public  KafkaRaftClient(RaftConfig raftConfig,
                           NetworkChannel channel,
                           ReplicatedLog log,
                           QuorumState quorum,
                           Time time,
                           FuturePurgatory<LogOffset> fetchPurgatory,
                           FuturePurgatory<LogOffset> appendPurgatory,
                           LogContext logContext);
    public  KafkaRaftClient(NetworkChannel channel,
                           ReplicatedLog log,
                           QuorumState quorum,
                           Time time,
                           Metrics metrics,
                           FuturePurgatory<LogOffset> fetchPurgatory,
                           FuturePurgatory<LogOffset> appendPurgatory,
                           Map<Integer, InetSocketAddress> voterAddresses,
                           int electionBackoffMaxMs,
                           int retryBackoffMs,
                           int requestTimeoutMs,
                           int fetchMaxWaitMs,
                           LogContext logContext,
                           Random random);

}