int rangeNum = 0;
for(final Map.Entry<Long, Long> range : ranges) {
final Integer partitionId = rangeNum;
rangeNum++;
final CObjectTokenVisitor visitor = visitorFactory.getInstance("" + rangeNum);
Runnable r = new Runnable() {
@Override
public void run() {
handle(range.getKey(), range.getValue(), visitor, partitionId);
}