public boolean isEmpty() {
        for (Deque<NetworkClient.InFlightRequest> deque : this.requests.values()) {
            if (!deque.isEmpty())
                return false;
        }
        return true;
    }
Return true if there is no in-flight request and false otherwise
clients/src/main/java/org/apache/kafka/clients/InFlightRequests.java