new ReloadingReference<List<List<HostAndPort>>>(new Callable<List<List<HostAndPort>>>() {
@Override
public List<List<HostAndPort>> call() {
if (RunnerConfiguration.AUTO_PARTITION_SPEC.equals(allPartitionsSpecString)) {
int port = Integer.parseInt(portString);
PartitionLoader loader =
ClassUtils.loadInstanceOf("net.myrrix.online.partition.PartitionLoaderImpl",
PartitionLoader.class);
List<List<HostAndPort>> newPartitions = loader.loadPartitions(port, bucket, instanceID);
log.debug("Latest partitions: {}", newPartitions);
return newPartitions;
}
return PartitionsUtils.parseAllPartitions(allPartitionsSpecString);
}