private void incrementCapacity() throws IOException {
        if (capacityChannel != null) {
            final int increment = capacityIncrement.getAndSet(0);
            if (increment > 0) {
                capacityChannel.update(increment);
            }
        }
    }
TODO: to be replaced by core functionality
httpclient5/src/main/java/org/apache/hc/client5/http/impl/compat/SharedInputBuffer.java