@Override
    public void close() {
        log.flush(true);
        if (kafkaRaftMetrics != null) {
            kafkaRaftMetrics.close();
        }
        if (memoryPool instanceof BatchMemoryPool) {
            BatchMemoryPool batchMemoryPool = (BatchMemoryPool) memoryPool;
            batchMemoryPool.releaseRetained();
        }
    }
Poll for new events. This allows the client to handle inbound
requests and send any needed outbound requests.
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java