Multimap<Range<Token>, InetAddress> rangeWithEndpoints = HashMultimap.create();
for (Range<Token> toStream : rangesPerTable.left)
{
Set<InetAddress> currentEndpoints = ImmutableSet.copyOf(strategy.calculateNaturalEndpoints(toStream.right, tokenMetadata_));
Set<InetAddress> newEndpoints = ImmutableSet.copyOf(strategy.calculateNaturalEndpoints(toStream.right, tokenMetaClone));
rangeWithEndpoints.putAll(toStream, Sets.difference(newEndpoints, currentEndpoints));
}
// associating table with range-to-endpoints map
rangesToStreamByTable.put(table, rangeWithEndpoints);