@Override
    public boolean initiateShutdown() {
        if (super.initiateShutdown()) {
            client.shutdown(5000).whenComplete((na, exception) -> {
                if (exception != null) {
                    log.error("Graceful shutdown of RaftClient failed", exception);
                } else {
                    log.info("Completed graceful shutdown of RaftClient");
                }
            });
            return true;
        } else {
            return false;
        }
    }
Closed in {@link #shutdown()} after shutdown completes.
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClientDriver.java