if (cfgFile.exists()) {
env = RuntimeEnvironment.getInstance();
log.log(Level.INFO, "Running indexer with configuration {0}", configfile);
env.readConfiguration(cfgFile);
Indexer index = Indexer.getInstance();
int noThreads = Management.getInstance().getNumberOfThreads().intValue();
boolean update = Management.getInstance().getUpdateIndexDatabase().booleanValue();
String[] sublist = Management.getInstance().getSubFiles();
log.info("Update source repositories");
HistoryGuru.getInstance().updateRepositories();
List<String> subFiles = Arrays.asList(sublist);
log.log(Level.INFO, "Starting index, update {0} noThreads {1} subfiles {2}", new Object[]{String.valueOf(update), String.valueOf(noThreads), String.valueOf(subFiles.size())});
index.doIndexerExecution(update, noThreads, subFiles, this);
log.info("Finished indexing");
lastIndexFinish = System.currentTimeMillis();
sendNotifications();
doNotify(NOTIFICATIONINFOLONGTYPE, "FinishedIndexing", Long.valueOf(lastIndexFinish));
lastIndexUsedTime = lastIndexFinish - lastIndexStart;
String publishhost = Management.getInstance().getPublishServerURL();
if ((publishhost == null) || (publishhost.equals(""))) {
log.warning("No publishhost given, not sending updates");
} else {
index.sendToConfigHost(env, publishhost);
doNotify(NOTIFICATIONINFOSTRINGTYPE, "Published index", publishhost);
}
} else {