// a get() on each future will block till that call completes.
for (Map.Entry<Address, Future<Object>> entry : futures.entrySet()) {
try {
retval.addRsp(entry.getKey(), entry.getValue().get(timeout, MILLISECONDS));
} catch (java.util.concurrent.TimeoutException te) {
throw new TimeoutException(formatString("Timed out after {0} waiting for a response from {1}",
prettyPrintTime(timeout), entry.getKey()));
}
}
} else if (mode == GroupRequest.GET_NONE) {