// Note: this deserializes the response a 2nd time if getData was called first
// (this is not currently an issue since we don't do read repair for range queries.)
public List<Row> resolve() throws IOException
{
CollatingIterator collator = new CollatingIterator(new Comparator<Pair<Row,InetAddress>>()
{
public int compare(Pair<Row,InetAddress> o1, Pair<Row,InetAddress> o2)
{
return o1.left.key.compareTo(o2.left.key);
}
});
int n = 0;
for (Message response : responses)
{
RangeSliceReply reply = RangeSliceReply.read(response.getMessageBody());
n = Math.max(n, reply.rows.size());
collator.addIterator(new RowIterator(reply.rows.iterator(), response.getFrom()));
}
// for each row, compute the combination of all different versions seen, and repair incomplete versions
ReducingIterator<Pair<Row,InetAddress>, Row> iter = new ReducingIterator<Pair<Row,InetAddress>, Row>(collator)
{