int cursor = clusterFamily.getCursor ();
ArrayList targets = clusterFamily.getTargets ();
if (targets.size () == 0)
return null;
if (cursor == FamilyClusterInfo.UNINITIALIZED_CURSOR)
{
// Obtain a random index into targets
cursor = RandomRobin.localRandomizer.nextInt(targets.size());
}
else
{
// Choose the next target
cursor = ( (cursor + 1) % targets.size() );
}
clusterFamily.setCursor (cursor);
return targets.get(cursor);