class KafkaRaftClient implements RaftClient {

    @Override
    public CompletableFuture<OffsetAndEpoch> append(
        Records records,
        AckMode ackMode,
        long timeoutMs
    ) {
        if (records.sizeInBytes() == 0)
            throw new IllegalArgumentException("Attempt to append empty record set");

        if (shutdown.get() != null)
            throw new IllegalStateException("Cannot append records while we are shutting down");

        if (quorum.isObserver())
            throw new IllegalStateException("Illegal attempt to write to an observer");

        CompletableFuture<OffsetAndEpoch> future = new CompletableFuture<>();
        UnwrittenAppend unwrittenAppend = new UnwrittenAppend(
            records, time.milliseconds(), timeoutMs, ackMode, future);

        if (!unwrittenAppends.offer(unwrittenAppend)) {
            future.completeExceptionally(new KafkaException("Failed to append records since the unsent " +
                "append queue is full"));
        }
        channel.wakeup();
        return future;
    }

    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);

}