// TODO: the max time this can take is actually N * timeout. Consider fixing this.
@Override
    public final V get(long timeout, TimeUnit unit)
        throws InterruptedException, ExecutionException, TimeoutException {
      Iterator<Integer> indexItr = order.iterator();
      V result = initResult();
      for (Future<K> future : futures) {
        // TODO: the max time this can take is actually N * timeout. Consider fixing this.
        result = aggregate(future.get(timeout, unit), indexItr, result);
      }
      return result;
    }
V result = initResult();
for (Future<K> future : futures) {
// TODO: the max time this can take is actually N * timeout. Consider fixing this.
result = aggregate(future.get(timeout, unit), indexItr, result);
}
@Override
public final V get(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
Iterator<Integer> indexItr = order.iterator();
V result = initResult();
for (Future<K> future : futures) {
// TODO: the max time this can take is actually N * timeout. Consider fixing this.
result = aggregate(future.get(timeout, unit), indexItr, result);
}
return result;
}
@Override
public final V get(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
Iterator<Integer> indexItr = order.iterator();
V result = initResult();
for (Future<K> future : futures) {
// TODO: the max time this can take is actually N * timeout. Consider fixing this.
result = aggregate(future.get(timeout, unit), indexItr, result);
}
return result;
}