public synchronized double request(String id, double minimumRequested, double preferredRequested, double rate) {
            CapacityAllocation allocation = available.get(id);
            if (allocation == null) {
                allocation = new CapacityAllocation(rate, clock);
                available.put(id, allocation);
            }
            return allocation.request(minimumRequested, preferredRequested, rate, maxAvailableCapacity);
        }
Returns an amount of capacity between 0 and the requested amount based on availability for this id
container-search/src/main/java/com/yahoo/search/searchers/RateLimitingSearcher.java