public CoverageAggregator adjustedDegradedCoverage(int redundancy, TimeoutHandler timeoutHandler) {
        int askedAndFailed = askedNodes + failedNodes;
        if (askedAndFailed == answeredNodesParticipated) {
            return this;
        }
        int notAnswered = askedAndFailed - answeredNodesParticipated;

        if (timeoutHandler.reason() == DEGRADED_BY_ADAPTIVE_TIMEOUT) {
            CoverageAggregator clone = new CoverageAggregator(this);
            return clone.adjustActiveDocs(notAnswered);
        } else {
            if (askedAndFailed > answeredNodesParticipated) {
                CoverageAggregator clone = new CoverageAggregator(this);
                int missingNodes = notAnswered - (redundancy - 1);
                if (missingNodes > 0) {
                    clone.adjustActiveDocs(missingNodes);
                }
                clone.degradedReason |= timeoutHandler.reason();
                return clone;
            }
        }
        return this;
    }
Aggregates coverage as responses are added.

@author baldersheim
container-search/src/main/java/com/yahoo/search/dispatch/CoverageAggregator.java