* owners or <code>target</code> is one of the owners.
*/
private boolean locateOwnersForLevel(int firstOwnerIndex, int replCount, Level level, SortedSet<Integer> levelIdChangeIndexes, Address target, List<Address> owners) {
// start with the nodes after firstOwnerIndex in the wheel
for (Integer addrIndex : levelIdChangeIndexes.tailSet(firstOwnerIndex)) {
TopologyAwareAddress address = (TopologyAwareAddress) positionValues[addrIndex];
if (addOwner(owners, address, replCount, target, level))
return true;
}
// continue with the nodes from the beginning to firstOwnerIndex
for (Integer addrIndex : levelIdChangeIndexes.headSet(firstOwnerIndex)) {
TopologyAwareAddress address = (TopologyAwareAddress) positionValues[addrIndex];
if (addOwner(owners, address, replCount, target, level))
return true;
}
return false;
}