public Iterable<NetworkClient.InFlightRequest> clearAll(String node) {
        Deque<NetworkClient.InFlightRequest> reqs = requests.get(node);
        if (reqs == null) {
            return Collections.emptyList();
        } else {
            final Deque<NetworkClient.InFlightRequest> clearedRequests = requests.remove(node);
            inFlightRequestCount.getAndAdd(-clearedRequests.size());
            return clearedRequests::descendingIterator;
        }
    }
Clear out all the in-flight requests for the given node and return them

@param node The node
@return All the in-flight requests for that node that have been removed
clients/src/main/java/org/apache/kafka/clients/InFlightRequests.java